<template>
  <div class="modal fade"
       id="newPremisesAddModal"
       tabindex="-1"
       role="dialog"
       aria-labelledby="myModalLabel"
       aria-hidden="true">
    <div class="self-modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button"
                  class="close"
                  data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
          <h2 class="modal-title text-center"> 新增楼盘</h2>
        </div>
        <div class="modal-body">
          <div class="row">
            <div class="col-md-3 col-lg-3 r-border"
                 :style="{'height':clientHeight + 'px','overflow-y': 'scroll'}">
              <ul class="layui-timeline">
                <li class="layui-timeline-item"
                    @click="selectPart(1,'timeline')">
                  <div class="fillInfoStatus"
                       :class="{'g-color':fillInfoStatus1}">{{fillInfoStatus1?'已完善':'待完善'}}</div>
                  <i class="layui-icon layui-timeline-axis"
                     :class="{'o-b-color':currentPage==1}"></i>
                  <div class="layui-timeline-content layui-text timeline-height">
                    <h3 class="layui-timeline-title"
                        :class="{'o-color':currentPage==1}">楼盘基本信息</h3>
                    <p>有关楼盘的基础信息</p>
                  </div>
                </li>
                <li class="layui-timeline-item"
                    @click="selectPart(2,'timeline')">
                  <div class="fillInfoStatus"
                       :class="{'g-color':fillInfoStatus2}">{{fillInfoStatus2?'已完善':'待完善'}}</div>
                  <i class="layui-icon layui-timeline-axis"
                     :class="{'o-b-color':currentPage==2}"></i>
                  <div class="layui-timeline-content layui-text timeline-height">
                    <h3 class="layui-timeline-title"
                        :class="{'o-color':currentPage==2}">户型信息</h3>
                    <p>所有可售户型信息</p>
                  </div>
                </li>
                <li class="layui-timeline-item"
                    @click="selectPart(3,'timeline')">
                  <div class="fillInfoStatus"
                       :class="{'g-color':fillInfoStatus3}">{{fillInfoStatus3?'已完善':'待完善'}}</div>
                  <i class="layui-icon layui-timeline-axis"
                     :class="{'o-b-color':currentPage==3}"></i>
                  <div class="layui-timeline-content layui-text timeline-height">
                    <h3 class="layui-timeline-title"
                        :class="{'o-color':currentPage==3}">分销信息</h3>
                    <p>分销业务设置规则</p>
                  </div>
                </li>
                <li class="layui-timeline-item"
                    @click="selectPart(4,'timeline')">
                  <i class="layui-icon layui-timeline-axis"
                     :class="{'o-b-color':currentPage==4}"></i>
                  <div class="layui-timeline-content layui-text timeline-height">
                    <h3 class="layui-timeline-title"
                        :class="{'o-color':currentPage==4}">楼盘相册</h3>
                    <p>给楼盘制作精美相册</p>
                  </div>
                </li>
                <li class="layui-timeline-item"
                    @click="selectPart(5,'timeline')">
                  <i class="layui-icon layui-timeline-axis"
                     :class="{'o-b-color':currentPage==5}"></i>
                  <div class="layui-timeline-content layui-text timeline-height">
                    <h3 class="layui-timeline-title"
                        :class="{'o-color':currentPage==5}">其他信息</h3>
                    <p>补充其他信息</p>
                  </div>
                </li>
              </ul>
            </div>
            <div class="col-md-9 col-lg-9"
                 v-show="partOne"
                 :style="{'height':clientHeight + 'px','overflow-y': 'scroll'}">
              <div class="main-content">
                <p class="base-title">
                  <span class="dot"></span><span class="o-color">*</span> 必填信息
                  <label style="float: right;padding-right: 7.2vw;"
                         v-if="linkM2BtnShow">
                    <span style="position: relative;">
                      <img src="../../assets/images/help_gray.svg"
                           class="questionImg"
                           @mouseover="showM2Tip(1)"
                           @mouseout="showM2Tip(2)">
                      <span v-show="M2TipShow"
                            class="m2TipContent">
                        关联M2房源后<br />
                        1、针对该楼盘的报备会进行客户判重<br />
                        2、客户到访后会自动转客到M2<br />
                        3、M2客户交易状态变更会同步到渠道王
                      </span>
                    </span>
                    <span class="linkM2Btn"
                          @click="linkM2()">关联M2楼盘</span>
                  </label>
                </p>
                <ul class="housing-list">
                  <li>
                    <div class="list-info-template col-md-6">
                      <label class="control-label"
                             for="">楼盘名称:</label>
                      <div class="control-details">
                        <input type="text"
                               class="form-control"
                               style="width: 19.8vw;height: 33px;"
                               placeholder="楼盘名称"
                               v-model="premises.name"
                               v-on:blur="checkPremisesName">
                        <span style="color:#ff0000;padding-left:5px;word-wrap:break-word !important;white-space: initial !important; "
                              v-if="premisesNames">已存在同名楼盘：{{premisesNames}}，请修改</span>
                      </div>
                    </div>
                    <div class="list-info-template col-md-6">
                      <label class="control-label"
                             for="">在售状态:</label>
                      <div class="control-details">
                        <select class="form-control"
                                style="width: 19.8vw;height: 33px;"
                                v-model="premises.saleStatus">
                          <option value="0">待售</option>
                          <option value="1">在售</option>
                          <option value="2">售罄</option>
                        </select>
                      </div>
                    </div>

                  </li>
                  <li :class="{'addrLi':finalPremisesMapAddress.premisesAddress}">
                    <div class="list-info-template col-md-6">
                      <label class="control-label"
                             for="">省份市区:</label>
                      <div class="control-details">
                        <select class="form-control"
                                style="width:6.3vw;float:left"
                                v-model="premises.provinceId"
                                id="provinceId"
                                v-on:change="getCity()">
                          <option v-for="(province,index) in province_list"
                                  :value="province.id"
                                  :key="index">{{province.name}}
                          </option>
                        </select>
                        <span style="float:left">-</span>
                        <select class="form-control"
                                style="width:6.3vw;float:left"
                                v-model="premises.cityId"
                                id="cityId"
                                v-on:change="getArea()">
                          <option v-for="(city,index) in city_list"
                                  :value="city.id"
                                  :key="index">{{city.name}}</option>
                        </select>
                        <span style="float:left">-</span>
                        <select class="form-control"
                                style="width:6.3vw;float:left"
                                v-model="premises.areaId"
                                id="areaId"
                                v-on:change="getAddress()">
                          <option v-for="(area,index) in area_list"
                                  :value="area.id"
                                  :key="index">{{area.name}}</option>
                        </select>
                      </div>
                    </div>
                    <div class="list-info-template col-md-6">
                      <label class="control-label"
                             for="">楼盘地址:</label>
                      <div class="control-details">
                        <input type="text"
                               class="form-control"
                               style="width: 19.8vw;height: 33px;"
                               placeholder="楼盘地址"
                               v-model="finalPremisesMapAddress.premisesAddress"
                               @blur="addressChange">
                      </div>
                      <div class="addrInfo"
                           v-show="finalPremisesMapAddress.premisesAddress.trim()"
                           @click="openMapModal">{{addressInfo}}</div>
                    </div>
                  </li>
                  <li>
                    <div class="list-info-template col-md-6">
                      <label class="control-label"
                             for="baseCodeValue">&nbsp;楼盘标签:</label>
                      <div class="col-xs-2 user-define">
                        <select id="baseCodeValue"
                                style="width: 19.8vw;height: 33px;"
                                multiple="multiple">
                          <option v-for="(row,index) in baseCodeValueList"
                                  :value="row.id"
                                  :key="index"
                                  style="padding: 0px;">{{row.codeName}}</option>
                        </select>
                      </div>
                    </div>
                    <div class="list-info-template col-md-6">
                      <label class="control-label"
                             for="">平均单价:</label>
                      <div style="width:30%;display:inline;text-align: center;padding-left: 20px;">
                        <InputNumber :min="0"
                                     v-model="beginPrice"
                                     size="small"></InputNumber>
                        <span style="padding:0 1.3vw">至</span>
                      </div>

                      <div style="width:25%;display:inline;">
                        <InputNumber :min="0"
                                     v-model="endPrice"
                                     size="small" />元/㎡
                      </div>
                    </div>
                  </li>
                  <li>
                    <div class="list-info-template col-md-6">
                      <label class="control-label"
                             for="buildingType">建筑类别:</label>
                      <div class="col-xs-2 user-define">
                        <select id="buildingType"
                                style="width: 19.8vw;height: 33px;"
                                height="33"
                                multiple>
                          <option v-for="(value,index) in buildingType_list"
                                  :value="index"
                                  :key="index">{{value}}</option>
                        </select>
                      </div>
                    </div>
                    <div class="list-info-template col-md-6">
                      <label class="control-label"
                             for="">装修状况:</label>
                      <div class="control-details">
                        <select class="form-control"
                                style="width: 19.8vw;height: 33px;"
                                v-model="premises.decorationType">
                          <option v-for="(row,index) in decoration_list"
                                  v-bind:value="index"
                                  :key="index">{{row}}</option>
                        </select>
                      </div>
                    </div>

                  </li>
                  <li>
                    <div class="list-info-template col-md-6">
                      <label class="control-label"
                             for="estateType">物业类型:</label>
                      <div class="col-xs-2 user-define">
                        <select id="estateType"
                                style="width:19.8vw;"
                                multiple="multiple">
                          <option v-for="(value,index) in estate_list"
                                  :value="index"
                                  :key="index">{{value}}</option>
                        </select>
                      </div>
                    </div>
                    <div class="list-info-template col-md-6">
                      <label class="control-label"
                             for="">物业费:</label>
                      <div class="control-details">
                        <input type="text"
                               class="form-control"
                               style="width: 17vw;height: 33px;display: inline-block;"
                               placeholder="物业费"
                               v-model="premises.propertyCharges">&nbsp;元/㎡/月
                      </div>
                    </div>
                  </li>
                  <li>
                    <div class="list-info-template col-md-6">
                      <label class="control-label"
                             for="">楼盘封面图:</label>
                      <div id="faceImg"
                           class="add-huxing over-img"
                           v-if="premises.url">
                        <img v-bind:src="premises.url"
                             style="position: absolute;left: 0;top: 0;width: 100%;height: 100%;" />
                        <i class="fa fa-times-circle"
                           @click="removeImage(null,null,'faceUrl')"></i>
                      </div>
                      <div class="add-huxing over-img"
                           v-if="!premises.url">
                        <input type="file"
                               class="file-btn"
                               style="width:100%; "
                               @change="onFileChange">
                        <p style="font-size: 36px;">＋</p>
                        <p>上传图片</p>
                      </div>
                    </div>
                  </li>

                </ul>
                <p class="base-title"><span class="dot"></span>选填信息<span class="tips">建议您尽量完善楼盘信息以增加楼盘的吸引力</span></p>
                <ul class="housing-list">
                  <li>
                    <div class="list-info-template col-md-6">
                      <label class="control-label"
                             for="">开盘日期:</label>
                      <div style="padding-left:20px; text-overflow:ellipsis;position: relative;">
                        <DatePicker type="date"
                                    placeholder="开盘日期"
                                    v-model="premises.openingTime"
                                    style="width: 19.8vw;"></DatePicker>
                      </div>
                    </div>
                    <div class="list-info-template col-md-6">
                      <label class="control-label"
                             for="">预计入住日期:</label>
                      <div style="padding-left:20px; text-overflow:ellipsis;position: relative;">
                        <DatePicker type="date"
                                    placeholder="入住日期"
                                    v-model="premises.checkInTime"
                                    style="width: 19.8vw;"></DatePicker>
                      </div>
                    </div>
                  </li>
                  <li>
                    <div class="list-info-template col-md-6">
                      <label class="control-label"
                             for="">容积率:</label>
                      <div class="control-details">
                        <input type="number"
                               class="form-control"
                               style="width: 19.8vw;"
                               placeholder="容积率"
                               v-model="premises.plotRatio">&nbsp;
                      </div>
                    </div>
                    <div class="list-info-template col-md-6">
                      <label class="control-label"
                             for="">绿化率:</label>
                      <div class="control-details">
                        <input type="number"
                               class="form-control"
                               style="width: 19.8vw;"
                               placeholder="绿化率"
                               v-model="premises.greeningRate">&nbsp;
                      </div>
                    </div>
                  </li>
                  <li>
                    <div class="list-info-template col-md-6">
                      <label class="control-label"
                             for="">物业公司:</label>
                      <div class="control-details">
                        <input type="text"
                               class="form-control"
                               style="width: 19.8vw;"
                               placeholder="物业公司"
                               v-model="premises.propertyCompany">
                      </div>
                    </div>
                    <div class="list-info-template col-md-6">
                      <label class="control-label"
                             for="">物业地址:</label>
                      <div class="control-details">
                        <input type="text"
                               class="form-control"
                               style="width: 19.8vw;"
                               placeholder="物业地址"
                               v-model="premises.propertyAddr">
                      </div>
                    </div>
                  </li>
                  <li>
                    <div class="list-info-template col-md-6">
                      <label class="control-label"
                             for="">产权年限:</label>
                      <div class="control-details">
                        <input type="number"
                               class="form-control"
                               style="width: 19.8vw;display: inline;"
                               placeholder="产权年限"
                               v-model="premises.rightYears">&nbsp;年
                      </div>
                    </div>
                    <div class="list-info-template col-md-6">
                      <label class="control-label">规划户数:</label>
                      <div class="control-details">
                        <input type="number"
                               class="form-control"
                               style="width: 19.8vw;"
                               placeholder="规划户数"
                               v-model="premises.houseHolds" />
                      </div>
                    </div>
                  </li>
                  <li>
                    <div class="list-info-template col-md-6">
                      <label class="control-label">地上车位数:</label>
                      <div class="control-details">
                        <input type="number"
                               class="form-control"
                               style="width: 19.8vw;"
                               placeholder="地上车位数"
                               v-model="premises.upCarPort">
                      </div>
                    </div>
                    <div class="list-info-template col-md-6">
                      <label class="control-label">地下车位数:</label>
                      <div class="control-details">
                        <input type="number"
                               class="form-control"
                               style="width: 19.8vw;"
                               placeholder="地下车位数"
                               v-model="premises.downCarPort" />
                      </div>
                    </div>
                  </li>
                  <li>
                    <div class="list-info-template col-md-6">
                      <label class="control-label">开发商:</label>
                      <div class="control-details">
                        <input class="form-control"
                               style="width: 19.8vw;"
                               placeholder="开发商"
                               v-model="premises.buildingCompany">
                      </div>
                    </div>
                    <div class="list-info-template col-md-6">
                      <label class="control-label">售楼部地址:</label>
                      <div class="control-details">
                        <input class="form-control"
                               style="width: 19.8vw;"
                               placeholder="售楼部地址"
                               v-model="premises.saleAddr" />
                      </div>
                    </div>
                  </li>
                  <li>
                    <div class="list-info-template col-sm-6">
                      <label class="control-label"
                             for="">全景看房地址:</label>
                      <div class="control-text">
                        <input type="text"
                               class="form-control"
                               style="width: 19.8vw;"
                               placeholder="全景看房地址"
                               v-model="premises.panoramicView">
                        <a v-bind:href="premises.panoramicView"
                           v-if="premises.panoramicView"
                           target="_blank"
                           style="color: cornflowerblue">
                          点击查看
                        </a>
                      </div>
                    </div>
                  </li>
                </ul>
              </div>
            </div>
            <div class="col-md-9 col-lg-9"
                 v-show="partTwo"
                 :style="{'height':clientHeight + 'px','overflow-y': 'scroll'}">
              <div class="main-content">
                <div class="houseTypeContainer">
                  <div class="houseTypeItem"
                       v-for="(editHouseType,key) in editHouseTypeList"
                       :key="key">
                    <p class="base-title"><span class="dot"></span>户型 {{key+1}}<span v-if="key > 0"
                            @click="delHouseTypeItem(key)"
                            class="delHouseTypeItemBtn">删除该户型</span></p>
                    <ul class="housing-list">
                      <li>
                        <div class="list-info-template col-md-12">
                          <label class="control-label"
                                 for=""><span class="required">*</span>户型格局:</label>
                          <div class="control-details">
                            <select class="form-control roomSelect"
                                    id="bedroom"
                                    v-model="editHouseType.room">
                              <option value="无卧室">无卧室</option>
                              <option value="1室">1室</option>
                              <option value="2室">2室</option>
                              <option value="3室">3室</option>
                              <option value="4室">4室</option>
                              <option value="5室">5室</option>
                              <option value="6室">6室</option>
                              <option value="7室">7室</option>
                              <option value="8室">8室</option>
                            </select>
                            <select class="form-control roomSelect"
                                    id="parlor"
                                    v-model="editHouseType.hall">
                              <option value="无厅">无厅</option>
                              <option value="1厅">1厅</option>
                              <option value="2厅">2厅</option>
                              <option value="3厅">3厅</option>
                              <option value="4厅">4厅</option>
                              <option value="5厅">5厅</option>
                              <option value="6厅">6厅</option>
                              <option value="7厅">7厅</option>
                              <option value="8厅">8厅</option>
                            </select>
                            <select class="form-control roomSelect"
                                    id="bathroom"
                                    v-model="editHouseType.bathroom">
                              <option value="无卫生间">无卫生间</option>
                              <option value="1卫">1卫</option>
                              <option value="2卫">2卫</option>
                              <option value="3卫">3卫</option>
                              <option value="4卫">4卫</option>
                              <option value="5卫">5卫</option>
                              <option value="6卫">6卫</option>
                              <option value="7卫">7卫</option>
                              <option value="8卫">8卫</option>
                            </select>
                            <select class="form-control roomSelect"
                                    id="balcony"
                                    v-model="editHouseType.balcony">
                              <option value="无阳台">无阳台</option>
                              <option value="1阳台">1阳台</option>
                              <option value="2阳台">2阳台</option>
                              <option value="3阳台">3阳台</option>
                              <option value="4阳台">4阳台</option>
                              <option value="5阳台">5阳台</option>
                              <option value="6阳台">6阳台</option>
                              <option value="7阳台">7阳台</option>
                              <option value="8阳台">8阳台</option>
                            </select>
                          </div>
                        </div>
                      </li>
                      <li>
                        <div class="list-info-template col-md-6">
                          <label class="control-label"
                                 for="">户型名称:</label>
                          <div class="control-details">
                            <input type="text"
                                   class="form-control"
                                   style="padding:6px 6px;display:inline;width:19.8vw;"
                                   placeholder="例如:C1户型"
                                   v-model="editHouseType.huxingName">
                          </div>
                        </div>
                        <div class="list-info-template col-md-6">
                          <label class="control-label"
                                 for=""><span class="required">*</span>户型朝向:</label>
                          <div class="control-details">
                            <select class="form-control col-md-8"
                                    id="orientations"
                                    style="display:inline;width:19.8vw;"
                                    v-model="editHouseType.orientations">
                              <option v-for="(value,key) in orientationsList"
                                      :value="value"
                                      :key="key">{{value}}</option>
                            </select>
                          </div>
                        </div>
                      </li>
                      <li>
                        <div class="list-info-template col-md-6">
                          <label class="control-label"
                                 for="">户型结构:</label>
                          <div class="control-details">
                            <select class="form-control col-md-8"
                                    id="houseStruct"
                                    style="display:inline;width:19.8vw;"
                                    v-model="editHouseType.houseStruct">
                              <option v-for="(value,key) in houseStructList"
                                      :value="value"
                                      :key="key">{{value}}</option>
                            </select>
                          </div>
                        </div>
                        <div class="list-info-template col-md-6">
                          <label class="control-label"
                                 for="">装修情况:</label>
                          <div class="control-details">
                            <select class="form-control col-md-8"
                                    id="decoration"
                                    style="display:inline;width:19.8vw;"
                                    v-model="editHouseType.decoration">
                              <option v-for="(value,key) in decoration_list"
                                      :value="value"
                                      :key="key">{{value}}</option>
                            </select>
                          </div>
                        </div>
                      </li>
                      <li>
                        <div class="list-info-template col-md-6">
                          <label class="control-label"
                                 for=""><span class="required">*</span>建筑面积:</label>
                          <div class="control-details">
                            <div style="width:30%;display:inline;text-align: center;">
                              <InputNumber :min="0"
                                           v-model="editHouseType.beginArea"
                                           size="small"></InputNumber>
                              <span style="padding:0 1.3vw">至</span>
                            </div>
                            <div style="width:25%;display:inline;">
                              <InputNumber :min="0"
                                           v-model="editHouseType.endArea"
                                           size="small" />平米
                            </div>
                          </div>
                        </div>
                        <div class="list-info-template col-md-6">
                          <label class="control-label"
                                 for=""><span class="required">*</span>平均单价:</label>
                          <div class="control-details">
                            <div style="width:30%;display:inline;text-align: center;">
                              <InputNumber :min="0"
                                           v-model="editHouseType.averageBeginPrice"
                                           size="small"></InputNumber>
                              <span style="padding:0 1.3vw">至</span>
                            </div>
                            <div style="width:25%;display:inline;">
                              <InputNumber :min="0"
                                           v-model="editHouseType.averageEndPrice"
                                           size="small" />元/平米
                            </div>
                          </div>
                        </div>
                      </li>
                      <li>
                        <div class="list-info-template col-md-12">
                          <label class="control-label"
                                 for=""><span class="required">*</span>户型图片:</label>
                          <div class="control-details">
                            <div class="face-img"
                                 style="text-align:left;">
                              <!-- <img v-if="editHouseType.url" v-bind:src="editHouseType.url" style="float: left;margin-right: 20px;width:130px;height:120px;" /> -->
                              <div class="file-image"
                                   v-for="(row,index) in  editHouseType.url"
                                   :key="index">
                                <img v-bind:src="row"
                                     width="150px"
                                     height="115px" />
                                <i class="fa fa-times-circle"
                                   @click="removeImage(editHouseType.url,index,'hxt')"></i>
                              </div>
                              <div class="add-huxing"
                                   style="margin: 0;">
                                <input type="file"
                                       class="file-btn"
                                       style="width:100%; "
                                       @change="onFileChange"
                                       :alt="'hxtImg-'+key">
                                <p style="font-size: 36px;line-height: 50px;">＋</p>
                                <p>上传图片</p>
                              </div>
                            </div>
                          </div>
                        </div>
                      </li>
                    </ul>
                  </div>
                </div>
                <!-- 添加新户型按钮 -->
                <div style="padding: 31px 0 20PX 2vw;">
                  <div @click="addHouseTypeItem"
                       class="addHouseTypeItemBtn"><span style="padding: 5px;">+</span>添加新户型</div>
                </div>
              </div>
            </div>
            <div class="col-md-9 col-lg-9"
                 v-show="partThree"
                 :style="{'height':clientHeight + 'px','overflow-y': 'scroll'}">
              <div class="main-content partThree">
                <p class="base-title"><span class="dot"></span>决策配置</p>
                <p class="base-title-small"></span>报备方式</p>
                <li class="commonLi"
                    style="margin-bottom: 0px;">
                  <div class="list-info-template col-md-6">
                    <label class="control-label"
                           for=""><span class="o-color">*</span>报备方式:</label>
                    <div class="control-details">
                      <select class="form-control"
                              style="width:19vw;height:33px;"
                              v-model="premises.reportWay">
                        <option value="1">全号</option>
                        <option value="2">前三后四</option>
                        <option value="3">前四后三</option>
                        <option value="4">前三后五</option>
                        <option value="5">前二后六</option>
                        <option value="6">前四后四</option>
                        <option value="0">全号/前三后四</option>
                      </select>
                    </div>
                  </div>
                  <div class="list-info-template col-md-6">
                    <label class="control-label"
                           for=""><span class="o-color">*</span>号码补全时间要求:</label>
                    <div class="control-details">
                      <select class="form-control"
                              style="width:19vw;height:33px;"
                              v-model="premises.completeNode">
                        <option value="1">无要求</option>
                        <option value="2">报备审核前</option>
                        <option value="3">到访审核前</option>
                        <option value="4">认筹审核前</option>
                        <option value="5">认购审核前</option>
                        <option value="6">签约审核前</option>
                      </select>
                    </div>
                  </div>
                </li>
                <li class="commonLi"
                    style="margin-bottom: 0px;">
                  <div class="list-info-template col-md-6"
                       v-if="checkSwitchShow">
                    <label class="control-label"
                           for=""><span class="o-color">*</span>到访前号码验真:</label>
                    <div class="control-details">
                      <select class="form-control"
                              style="width:19vw;height:33px;"
                              v-model="premises.checkSwitch">
                        <option value="0">不需要</option>
                        <option value="1">需要</option>
                      </select>
                    </div>
                  </div>
                </li>
                <p class="base-title-small"></span>提前报备规则</p>
                <li class="commonLi">
                  <div class="list-info-template col-md-6">
                    <label class="control-label"
                           for=""
                           style="width:100px"><span class="o-color">*</span>最短报备时间限制:</label>
                    <div class="control-details"
                         style="white-space: initial;">
                      <input type="number"
                             class="form-control"
                             style="width:12.3vw;display:inline"
                             v-model="premises.specialTime">
                      <div class=""
                           style="display: inline-flex;">
                        <Select v-model="premises.specialTimeType"
                                style="width:76px">
                          <Option value="4">不需要</Option>
                          <Option value="3">分钟</Option>
                          <Option value="2">小时</Option>
                          <Option value="1">天</Option>
                        </Select>
                        <img src="../../assets/images/help.svg"
                             style="width: 20px; height: 20px; margin: 8px;"
                             @click="showExplain(1)">
                      </div>
                      <div style="padding:5px 0;color:#999;max-width: 18vw;">
                        限制报备时间距离<span class="o-color">预计到访时间</span>的最少提前时间量，短于这个时间量将<span class="o-color">不能进行常规报备</span>，且短于这个时间<span class="o-color">无法审核到访</span>
                      </div>
                    </div>
                  </div>
                </li>
                <p class="base-title-small"></span>保护期规则</p>
                <li class="commonLi">
                  <div class="list-info-template col-md-6">
                    <label class="control-label"
                           for=""><span class="o-color">*</span>报备保护时间限制:</label>
                    <div class="control-details"
                         style="white-space: initial;">
                      <input name="reportProtect"
                             type="number"
                             class="form-control"
                             style="width:12.3vw;display:inline"
                             v-model="premises.reportProtect">
                      <div class=""
                           style="display: inline-flex;">
                        <Select v-model="premises.reportProtectType"
                                style="width:76px">
                          <Option value='4'>无保护</Option>
                          <Option value='3'>分钟</Option>
                          <Option value='2'>小时</Option>
                          <Option value='1'>天</Option>
                        </Select>
                      </div>
                      <a type="primary"
                         size="small"
                         class="delay-button"
                         href="#"
                         :disabled="premises.reportProtectType == 4 || !premises.reportProtect"
                         v-on:click="toOverdueConfig(3)"
                         v-res="{code:'menu_0004_0001_0010_0003'}">高级配置</a>
                      <div style="padding:5px 0;color:#999;max-width: 18vw;">
                        从<span class="o-color">报备时间开始计算</span>，在保护时间内，其他经纪人<span class="o-color">无法报备相同号码的客户</span>，超时未到访<span class="o-color">解除保护</span>
                      </div>
                    </div>
                  </div>
                  <div class="list-info-template col-md-6">
                    <label class="control-label"
                           for="">到访保护期:</label>
                    <div class="control-details"
                         style="white-space: initial;">
                      <input type="number"
                             class="form-control"
                             style="width:12.3vw;display:inline;"
                             v-model="premises.visitBaohu">
                      <div class=""
                           style="display: inline-flex;">
                        <Select v-model="premises.visitBaohuType"
                                style="width:76px">
                          <Option value="5">无期限</Option>
                          <Option value="4">无保护</Option>
                          <Option value="3">分钟</Option>
                          <Option value="2">小时</Option>
                          <Option value="1">天</Option>
                        </Select>
                      </div>
                      <div style="padding:5px 0;color:#999;max-width: 18vw;">
                        <span class="o-color">到访保护期内，</span>不允许同号码报备和到访。<span class="o-color">默认无期限，</span>即到访后，只要报备不转为无效，均不允许同号码报备和到访。
                      </div>
                      <div>
                        <Checkbox v-model="premises.visitBaohuRepeat">复访顺延到访保护期</Checkbox>
                      </div>
                    </div>
                  </div>
                </li>
                <p class="base-title-small"></span>有效期规则</p>
                <li class="commonLi">
                  <div class="list-info-template col-md-6">
                    <label class="control-label"
                           for=""><span class="o-color">*</span>报备有效期:</label>
                    <div class="control-details"
                         style="white-space: initial;">
                      <input name="reportValid"
                             class="form-control"
                             style="width:12.3vw;display:inline"
                             v-model="premises.reportValid" />
                      <div class=""
                           style="display: inline-flex;">
                        <Select v-model="premises.reportValidType"
                                style="width:76px">
                          <Option value='5'>无期限</Option>
                          <Option value='3'>分钟</Option>
                          <Option value='2'>小时</Option>
                          <Option value='1'>天</Option>
                        </Select>
                      </div>
                      <a type="primary"
                         size="small"
                         class="delay-button"
                         href="javascript:void(0)"
                         @click="toOverdueConfig(4)"
                         v-res="{code:'menu_0004_0001_0010_0004'}">高级配置</a>
                      <div style="padding:5px 0;color:#999;max-width: 18vw;">
                        从<span class="o-color">报备时间开始计算</span>，超过报备有效期,还未到访的客户,将报备<span class="o-color">自动转为无效客户</span>
                      </div>
                    </div>
                  </div>
                </li>
                <li class="commonLi"
                    style="margin-bottom: 100px;">
                  <div class="list-info-template col-md-6">
                    <label class="control-label"
                           for=""
                           style="width:100px"><span class="o-color">*</span>到访延长时间限制:</label>
                    <div class="control-details"
                         style="white-space: initial;">
                      <input type="number"
                             class="form-control"
                             style="width:12.3vw;display:inline;"
                             v-model="premises.visitProtect">
                      <div class=""
                           style="display: inline-flex;">
                        <Select v-model="premises.visitProtectType"
                                style="width:76px">
                          <Option value="4">不需要</Option>:
                          <Option value="3">分钟</Option>
                          <Option value="2">小时</Option>
                          <Option value="1">天</Option>
                        </Select>
                        <img src="../../assets/images/help.svg"
                             style="width: 20px; height: 20px; margin: 8px;"
                             @click="showExplain(2)">
                      </div>
                      <!-- 到访延长高级配置功能取消: 2020-6-24、需求: QDW-406 -->
                      <a type="primary"
                         size="small"
                         class="delay-button"
                         v-if="false"
                         :disabled="premises.visitProtectType==4 || !premises.visitProtect"
                         @click="toOverdueConfig(1)"
                         v-res="{code:'menu_0004_0001_0010_0001'}">高级配置</a>
                      <div style="padding:5px 0;color:#999;max-width: 18vw;">
                        允许<span class="o-color">预计到访时间</span>延后的最大时间量，超过这个时间还未到访的客户将<span class="o-color">自动转为为无效客户</span>
                      </div>
                    </div>
                  </div>
                  <div class="list-info-template col-md-6">
                    <label class="control-label"
                           for=""><span class="o-color">*</span>交易延长时间限制:</label>
                    <div class="control-details"
                         style="white-space: initial;">
                      <input type="number"
                             class="form-control"
                             style="width:12.3vw;display:inline"
                             v-model="premises.saveDays">
                      <div class=""
                           style="display: inline-flex;">
                        <Select v-model="premises.saveDaysType"
                                style="width:76px">
                          <Option :value="4">不需要</Option>
                          <Option :value="3">分钟</Option>
                          <Option :value="2">小时</Option>
                          <Option :value="1">天</Option>
                        </Select>
                        <img src="../../assets/images/help.svg"
                             style="width: 20px; height: 20px; margin: 8px;"
                             @click="showExplain(3)">
                      </div>
                      <!-- 交易延长高级配置功能取消: 2020-6-24、需求: QDW-406 -->
                      <a type="primary"
                         size="small"
                         class="delay-button"
                         v-if="false"
                         :disabled="!premises.saveDaysType||premises.saveDaysType==4||!premises.saveDays"
                         @click="toOverdueConfig(2)"
                         v-res="{code:'menu_0004_0001_0010_0002'}">高级配置</a>
                      <div style="padding:5px 0;color:#999;max-width: 18vw;">
                        <span class="o-color">确认到访后</span>，在此规定时间内，未能进入下个交易环节的客户将<span class="o-color">自动转为无效客户</span>，不填写默认设置为7天
                      </div>
                      <div>
                        <Checkbox v-model="premises.repeatDelayDealTime">复访顺延交易延长时间</Checkbox>
                      </div>
                      <div>
                        <Checkbox v-model="premises.closeProtectMachine">到访转认筹后不再启用保护机制</Checkbox>
                      </div>
                    </div>
                  </div>
                </li>
                <p class="base-title-small"></span>合作规则</p>
                <li class="commonLi">
                  <div class="list-info-template col-md-6">
                    <label class="control-label"
                           for="">合作有效期:</label>
                    <div class="control-details"
                         style="white-space: initial;">
                      <div style="width:30%;display:inline;text-align: center;">
                        <DatePicker type="date"
                                    placeholder="合作开始时间"
                                    v-model="premises.cooperationBeginTime"
                                    style="width: 9.5vw;"></DatePicker>
                        <span style="padding:0 0.3vw">至</span>
                      </div>
                      <div style="width:25%;display:inline;">
                        <DatePicker type="date"
                                    placeholder="合作结束时间"
                                    v-model="premises.cooperationEndTime"
                                    style="width: 9.5vw;"></DatePicker>
                      </div>
                    </div>
                  </div>
                  <div class="list-info-template col-md-6">
                    <label class="control-label"
                           for=""><span class="o-color">*</span>结佣方式:</label>
                    <div class="control-details">
                      <select class="form-control"
                              style="width:19vw;height:33px;"
                              v-model="premises.commissionWay">
                        <option value="1">签约结佣</option>
                        <option value="2">按揭结佣</option>
                        <option value="3">首付交齐</option>
                        <option value="4">全款到账</option>
                      </select>
                    </div>
                  </div>
                </li>

                <div style="clear: both;"></div>
                <p class="base-title">
                  <span class="dot"></span>人员配置
                  <font color="red"
                        style="font-size: 12px;">(项目总监及项目经理需开启相应角色权限后,即可查看其所负责的楼盘和报备数据)</font>
                </p>
                <li class="commonLi">
                  <div class="list-info-template col-md-6">
                    <label class="control-label"
                           for=""
                           style="width:100px"><span class="o-color">*</span>项目总监:</label>
                    <div class="control-details">
                      <div @click="showSelectUserModal('chief')"
                           class="selectUserName">{{this.$store.getters.selectUserDataChiefName?this.$store.getters.selectUserDataChiefName:'请选择'}}</div>
                      <div style="padding:5px 0;color:#999;word-wrap:break-word">
                        联系方式：{{this.$store.getters.selectUserDataChiefPhone}}
                      </div>
                    </div>
                  </div>
                  <div class="list-info-template col-md-6">
                    <label class="control-label"
                           for=""
                           style="width:100px"><span class="o-color">*</span>项目经理:</label>
                    <div class="control-details">
                      <div @click="showSelectUserModal('manager')"
                           class="selectUserName">{{this.$store.getters.selectUserDataManagerName?this.$store.getters.selectUserDataManagerName:'请选择'}}</div>
                      <div style="padding:5px 0;color:#999;word-wrap:break-word">
                        联系方式：{{this.$store.getters.selectUserDataManagerPhone}}
                      </div>
                    </div>
                  </div>
                </li>
                <p class="base-title"><span class="dot"></span>奖金配置</p>
                <li class="commonLi">
                  <div class="list-info-template col-md-6 list-info-templateTwo">
                    <div class="control-labelTwo">分销佣金:</div>
                    <div class="control-details">
                      <table class="commissionTable">
                        <thead style="display:block">
                          <tr style="display:block;font-size:0">
                            <th class="eachItem"
                                style="width:15%">方案名称</th>
                            <th class="eachItem"
                                style="width:15%">佣金</th>
                            <th class="eachItem"
                                style="width:60%">描述</th>
                            <th style="width:10%;display: inline-block;border:0;background:#fff"></th>
                          </tr>
                        </thead>
                        <tbody id="commissionTableBody"
                               style="display:block">
                          <tr v-for="(item, index) in commissionList"
                              :key="index"
                              style="display:block;font-size:0">
                            <td class="eachItem"
                                style="width:15%">{{item.name}}</td>
                            <td class="eachItem"
                                style="width:15%">{{item.typeValue}}{{item.type}}</td>
                            <td class="eachItem"
                                style="width:60%">{{item.desc}}</td>
                            <td style="width:10%;display: inline-block;border:0;line-height:40px">
                              <img @click="delCommission(index)"
                                   src="../../assets/images/del.svg"
                                   style="width:60%;height:60%;" />
                            </td>
                          </tr>
                          <tr style="display:block;font-size:0">
                            <td class="eachItem"
                                style="width:15%"><a href="javascript:void(0);"
                                 @click="addOpType"
                                 class="o-color">+添加</a></td>
                            <td class="eachItem"
                                style="width:15%">-</td>
                            <td class="eachItem"
                                style="width:60%">-</td>
                          </tr>
                        </tbody>
                      </table>
                    </div>
                  </div>
                  <div class="list-info-template col-md-6 list-info-templateTwo">
                    <label class="control-labelTwo">其他奖金:</label>
                    <div class="control-details">
                      <table class="rewardTable">
                        <thead>
                          <tr>
                            <th>是否启用</th>
                            <th>奖金项</th>
                            <th>奖金额（元）</th>
                          </tr>
                        </thead>
                        <tbody>
                          <tr>
                            <td></td>
                            <td>带看奖励</td>
                            <td><input type="text"
                                     v-model="premises.reward"></td>
                          </tr>
                          <tr>
                            <td>
                              <Checkbox v-model="rewardData.dealReward"
                                        @on-change="checkboxChange('dealReward')"></Checkbox>
                            </td>
                            <td>成交奖</td>
                            <td>
                              <input type="text"
                                     v-if="rewardData.dealReward"
                                     :disabled="!rewardData.dealReward"
                                     v-model="premises.dealAward">
                              <input type="text"
                                     v-else
                                     :disabled="!rewardData.dealReward">
                            </td>
                          </tr>
                          <tr>
                            <td>
                              <Checkbox v-model="rewardData.cashReward"
                                        @on-change="checkboxChange('cashReward')"></Checkbox>
                            </td>
                            <td>现金奖</td>
                            <td>
                              <input type="text"
                                     v-if="rewardData.cashReward"
                                     :disabled="!rewardData.cashReward"
                                     v-model="premises.dealAward">
                              <input type="text"
                                     v-else
                                     :disabled="!rewardData.cashReward">
                            </td>
                          </tr>
                        </tbody>
                      </table>
                    </div>
                  </div>
                </li>
                <div style="clear: both;"></div>
                <p class="base-title">
                  <span class="dot"></span>其他信息
                  <Checkbox-group v-model="distributionCheckbox"
                                  style="display: inline-block;margin-left: 20px;">
                    <Checkbox label="salesInfo">促销信息</Checkbox>
                    <Checkbox label="projectFeature">项目特色</Checkbox>
                    <Checkbox label="cooperationRules">合作规则</Checkbox>
                  </Checkbox-group>
                </p>
                <li class="otherLi"
                    v-if="distributionCheckbox.includes('salesInfo')">
                  <div class="list-info-template"
                       style="width:62vw;">
                    <label class="control-label"
                           for="">促销信息</label>
                    <div class="control-details"
                         style="height: 270px;">
                      <quill-editor id="discount"
                                    v-model="premises.discount"
                                    :options="editorOptionAdd"></quill-editor>
                    </div>
                  </div>
                </li>
                <li class="otherLi"
                    v-if="distributionCheckbox.includes('projectFeature')">
                  <div class="list-info-template"
                       style="width:62vw;">
                    <label class="control-label"
                           for="">项目特色</label>
                    <div class="control-details"
                         style="height: 270px;">
                      <quill-editor id="feature"
                                    v-model="premises.feature"
                                    :options="editorOptionAdd"></quill-editor>
                    </div>
                  </div>
                </li>
                <li class="otherLi"
                    v-if="distributionCheckbox.includes('cooperationRules')">
                  <div class="list-info-template"
                       style="width:62vw;">
                    <label class="control-label"
                           for="">合作规则</label>
                    <div class="control-details"
                         style="height: 270px;">
                      <quill-editor id="cooperationRule"
                                    v-model="premises.cooperationRule"
                                    :options="editorOptionAdd"></quill-editor>
                    </div>
                  </div>
                </li>
              </div>
            </div>
            <div class="col-md-9 col-lg-9"
                 v-show="partFour"
                 :style="{'height':clientHeight + 'px','overflow-y': 'scroll'}">
              <p class="base-title"><span class="dot"></span>楼盘相册</p>
              <ul class="nav nav-tabs"
                  style="margin: 15px">
                <li class="presentation active"
                    role="presentation"
                    id="p3">
                  <a href="#yangbanjian"
                     data-toggle="tab">样板间({{showImgCount(3)}})</a>
                </li>
                <li class="presentation"
                    role="presentation"
                    id="p4">
                  <a href="#xiaoguotu"
                     data-toggle="tab">效果图({{showImgCount(4)}})</a>
                </li>
                <li class="presentation"
                    role="presentation"
                    id="p5">
                  <a href="#xiaoqupeitao"
                     data-toggle="tab">小区配套({{showImgCount(5)}})</a>
                </li>
                <li class="presentation"
                    role="presentation"
                    id="p6">
                  <a href="#shijingtu"
                     data-toggle="tab">实景图({{showImgCount(6)}})</a>
                </li>
                <li class="presentation"
                    role="presentation"
                    id="p7">
                  <a href="#xiangmuxianchang"
                     data-toggle="tab">项目现场({{showImgCount(7)}})</a>
                </li>
              </ul>
              <div class="tab-content"
                   style="margin: 20px;">
                <div class="tab-pane fade in active"
                     id="yangbanjian">
                  <div class="file-image"
                       v-for="(row,index) in premisesImages"
                       v-if="row.imageType == '3'"
                       :key="index">
                    <img v-bind:src="row.imageUrl"
                         width="150px"
                         height="115px" />
                    <i class="fa fa-times-circle"
                       @click="removeImage(row,index,'premises')"></i>
                  </div>
                  <div class="file-image">
                    <div class="file-upload"
                         style="padding: 0;">
                      <input ref="businessLicense"
                             type="file"
                             class="file-btn"
                             style="width:100%;"
                             @change="onFileChange"
                             alt="3">
                      <i class="layui-icon"></i>
                      <p>添加样板间</p>
                    </div>
                  </div>
                </div>
                <div class="tab-pane fade "
                     id="xiaoguotu">
                  <div class="file-image"
                       v-for="(row,index) in premisesImages"
                       v-if="row.imageType == '4'"
                       :key="index">
                    <img v-bind:src="row.imageUrl"
                         width="150px"
                         height="115px" />
                    <i class="fa fa-times-circle"
                       @click="removeImage(row,index,'premises')"></i>
                  </div>
                  <div class="file-image">
                    <div class="file-upload"
                         style="padding: 0;">
                      <input ref="distributorContract"
                             type="file"
                             class="file-btn"
                             style="width:100%; "
                             @change="onFileChange"
                             alt="4">
                      <i class="layui-icon"></i>
                      <p>添加效果图</p>
                    </div>
                  </div>
                </div>

                <div class="tab-pane fade"
                     id="xiaoqupeitao">
                  <div class="file-image"
                       v-for="(row,index) in premisesImages"
                       v-if="row.imageType == '5'"
                       :key="index">
                    <img v-bind:src="row.imageUrl"
                         width="150px"
                         height="115px" />
                    <i class="fa fa-times-circle"
                       @click="removeImage(row,index,'premises')"></i>
                  </div>
                  <div class="file-image">
                    <div class="file-upload"
                         style="padding: 0;">
                      <input ref="salePermit"
                             type="file"
                             class="file-btn"
                             style="width:100%; "
                             @change="onFileChange"
                             alt="5">
                      <i class="layui-icon"></i>
                      <p>添加小区配套</p>
                    </div>
                  </div>
                </div>

                <div class="tab-pane fade"
                     id="shijingtu">
                  <div class="file-image"
                       v-for="(row,index) in premisesImages"
                       v-if="row.imageType == '6'"
                       :key="index">
                    <img v-bind:src="row.imageUrl"
                         width="150px"
                         height="115px" />
                    <i class="fa fa-times-circle"
                       @click="removeImage(row,index,'premises')"></i>
                  </div>

                  <div class="file-image">
                    <div class="file-upload"
                         style="padding: 0;">
                      <input ref="warrant"
                             type="file"
                             class="file-btn"
                             style="width:100%; "
                             @change="onFileChange"
                             alt="6">
                      <i class="layui-icon"></i>
                      <p>添加实景图</p>
                    </div>
                  </div>
                </div>
                <div class="tab-pane fade"
                     id="xiangmuxianchang">
                  <div class="file-image"
                       v-for="(row,index) in premisesImages"
                       v-if="row.imageType == '7'"
                       :key="index">
                    <img v-bind:src="row.imageUrl"
                         width="150px"
                         height="115px" />
                    <i class="fa fa-times-circle"
                       @click="removeImage(row,index,'premises')"></i>
                  </div>

                  <div class="file-image">
                    <div class="file-upload"
                         style="padding: 0;">
                      <input ref="warrant"
                             type="file"
                             class="file-btn"
                             style="width:100%; "
                             @change="onFileChange"
                             alt="7">
                      <i class="layui-icon"></i>
                      <p>项目现场</p>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div class="col-md-9 col-lg-9 partFive"
                 v-show="partFive"
                 :style="{'height':clientHeight + 'px','overflow-y': 'scroll'}">
              <p class="base-title"><span class="dot"></span>公司信息<Checkbox style="display: inline-block;margin-left: 20px;"
                          v-model="companyInfoCheck">公司信息</Checkbox>
              </p>
              <ul class="housing-list"
                  v-if="companyInfoCheck">
                <li>
                  <div class="list-info-template">
                    <label class="control-label">公司名称:</label>
                    <div class="control-details">
                      <input type="text"
                             class="form-control"
                             style="width:30%"
                             placeholder="公司名称"
                             v-model="premises.corporateName">
                    </div>
                  </div>
                </li>
                <li>
                  <div class="list-info-template"
                       style="width:62vw;">
                    <label class="control-label"
                           for="">公司简介:</label>
                    <div class="control-details"
                         style="height: 270px;">
                      <quill-editor id="corporateDesc"
                                    v-model="premises.corporateDesc"
                                    :options="editorOptionAdd"></quill-editor>
                    </div>
                  </div>
                </li>
                <li>
                  <div class="list-info-template"
                       style="width:62vw;">
                    <label class="control-label"
                           for="">证照资料:</label>
                    <div class="control-details">
                      <ul id="myTab"
                          class="nav nav-tabs">
                        <li class="active">
                          <a href="#zhizhao"
                             data-toggle="tab">营业执照（{{showLicenseImgCount(60)}}）</a>
                        </li>
                        <li>
                          <a href="#hetong"
                             data-toggle="tab">分销合同（{{showLicenseImgCount(70)}}）</a>
                        </li>
                        <li>
                          <a href="#xukezheng"
                             data-toggle="tab">预售许可证（{{showLicenseImgCount(80)}}）</a>
                        </li>
                        <li>
                          <a href="#shouquanshu"
                             data-toggle="tab">开发商授权书（{{showLicenseImgCount(90)}}）</a>
                        </li>
                      </ul>
                      <div id="myTabContent"
                           class="tab-content">
                        <div class="tab-pane fade in active"
                             id="zhizhao">

                          <div class="file-image"
                               v-for="(row,index) in licenseList"
                               :key="index"
                               v-if="row.imageType==60">
                            <img v-bind:src="row.imageUrl"
                                 width="150px"
                                 height="115px" />
                            <i class="fa fa-times-circle"
                               @click="removeImage(row,index,'license')"></i>
                          </div>

                          <div class="file-image">
                            <div class="file-upload">
                              <input ref="businessLicense"
                                     type="file"
                                     class="file-btn"
                                     style="width:100%;"
                                     @change="onFileChange"
                                     alt="60">
                              <i class="layui-icon"></i>
                              <p>添加营业执照</p>
                            </div>
                          </div>

                        </div>
                        <div class="tab-pane fade "
                             id="hetong">
                          <div class="file-image"
                               v-for="(row,index) in licenseList"
                               :key="index"
                               v-if="row.imageType==70">
                            <img v-bind:src="row.imageUrl"
                                 width="150px"
                                 height="115px" />
                            <i class="fa fa-times-circle"
                               @click="removeImage(row,index,'license')"></i>
                          </div>

                          <div class="file-image">
                            <div class="file-upload">
                              <input ref="distributorContract"
                                     type="file"
                                     class="file-btn"
                                     style="width:100%; "
                                     @change="onFileChange"
                                     alt="70">
                              <i class="layui-icon"></i>
                              <p>添加分销合同</p>
                            </div>
                          </div>
                        </div>

                        <div class="tab-pane fade"
                             id="xukezheng">

                          <div class="file-image"
                               v-for="(row,index) in licenseList"
                               :key="index"
                               v-if="row.imageType==80">
                            <img v-bind:src="row.imageUrl"
                                 width="150px"
                                 height="115px" />
                            <i class="fa fa-times-circle"
                               @click="removeImage(row,index,'license')"></i>
                          </div>

                          <div class="file-image">
                            <div class="file-upload">
                              <input ref="salePermit"
                                     type="file"
                                     class="file-btn"
                                     style="width:100%; "
                                     @change="onFileChange"
                                     alt="80">
                              <i class="layui-icon"></i>
                              <p>添加预售许可证</p>
                            </div>
                          </div>
                        </div>

                        <div class="tab-pane fade"
                             id="shouquanshu">
                          <div class="file-image"
                               v-for="(row,index) in licenseList"
                               :key="index"
                               v-if="row.imageType==90">
                            <img v-bind:src="row.imageUrl"
                                 width="150px"
                                 height="115px" />
                            <i class="fa fa-times-circle"
                               @click="removeImage(row,index,'license')"></i>
                          </div>

                          <div class="file-image">
                            <div class="file-upload">
                              <input ref="warrant"
                                     type="file"
                                     class="file-btn"
                                     style="width:100%; "
                                     @change="onFileChange"
                                     alt="90">
                              <i class="layui-icon"></i>
                              <p>添加开发商授权书</p>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </li>
              </ul>
              <div style="clear: both;"></div>
              <p class="base-title">
                <span class="dot"></span>其他信息
                <Checkbox-group v-model="otherInfoCheckbox"
                                style="display: inline-block;margin-left: 20px;">
                  <Checkbox label="houseSales">楼盘卖点</Checkbox>
                  <Checkbox label="targetCustomer">目标客户</Checkbox>
                  <Checkbox label="exGuestSkill">拓客技巧</Checkbox>
                  <Checkbox label="projectIntroduction">项目介绍</Checkbox>
                </Checkbox-group>
              </p>
              <li class="otherLi"
                  v-if="otherInfoCheckbox.includes('houseSales')">
                <div class="list-info-template"
                     style="width:78%">
                  <label class="control-label"
                         for="">楼盘卖点</label>
                  <div class="control-details"
                       style="height: 270px;">
                    <quill-editor id="discount"
                                  v-model="premises.selling"
                                  :options="editorOptionAdd"></quill-editor>
                  </div>
                </div>
              </li>
              <li class="otherLi"
                  v-if="otherInfoCheckbox.includes('targetCustomer')">
                <div class="list-info-template"
                     style="width:78%">
                  <label class="control-label"
                         for="">目标客户</label>
                  <div class="control-details"
                       style="height: 270px;">
                    <quill-editor id="feature"
                                  v-model="premises.customer"
                                  :options="editorOptionAdd"></quill-editor>
                  </div>
                </div>
              </li>
              <li class="otherLi"
                  v-if="otherInfoCheckbox.includes('exGuestSkill')">
                <div class="list-info-template"
                     style="width:78%">
                  <label class="control-label"
                         for="">拓客技巧</label>
                  <div class="control-details"
                       style="height: 270px;">
                    <quill-editor id="cooperationRule"
                                  v-model="premises.saleSkill"
                                  :options="editorOptionAdd"></quill-editor>
                  </div>
                </div>
              </li>
              <li class="otherLi"
                  v-if="otherInfoCheckbox.includes('projectIntroduction')">
                <div class="list-info-template"
                     style="width:78%">
                  <label class="control-label"
                         for="">项目介绍</label>
                  <div class="control-details"
                       style="height: 270px;">
                    <quill-editor id="cooperationRule"
                                  v-model="premises.introduction"
                                  :options="editorOptionAdd"></quill-editor>
                  </div>
                </div>
              </li>
              <div class="base-title">
                <span class="dot"></span>楼盘资料
                <div class="premises_file">
                  <input type="file"
                         class="file-btn"
                         style="width:100%; "
                         accept="img"
                         @change="onPremisesFileChange">
                  <!-- <p>上传图片</p> -->
                  <p class="o-color"
                     style="display:inline; text-decoration:underline"> 选择附件 </p>
                </div>
              </div>
              <div style="padding:5px 162px 1px 162px;color:#999;">
                1、文件格式仅限doc、docx、ppt、pptx、xls、xlsx、pdf、jpg、jpeg、img、icon、png、gif
              </div>
              <div style="padding:1px 162px 1px 162px;color:#999;">
                2、单个文件上传大小不得大于20M
              </div>
              <div style="padding:1px 162px 10px 162px;color:#999;">
                3、最多可上传10个文件
              </div>
              <ul>
                <li v-for='(item, index) in premisesFileList'
                    style="font-size: 15px; padding-left:162px;">
                  <div v-if="item.isDeleted == 0">
                    <i class="fa fa-file-word-o"
                       v-if="item.fileType == 8"></i>
                    <i class="fa fa-file-excel-o"
                       v-if="item.fileType == 9"></i>
                    <i class="fa fa-file-ppt-o"
                       v-if="item.fileType == 10"></i>
                    <i class="fa fa-file-image-o"
                       v-if="item.fileType == 11"></i>
                    <i class="fa fa-file-pdf-o"
                       v-if="item.fileType == 12"></i>
                    <i class="fa fa-file-zip-o"
                       v-if="item.fileType == 13"></i>
                    <a style="padding-left: 5px; padding-right: 5px; text-decoration: underline;"
                       v-bind:href="item.url">{{item.fileName}}</a>
                    <span class="o-color"
                          @click="removepremiseFile(index)"
                          style="cursor:pointer">删除</span>
                  </div>
                </li>
              </ul>
            </div>
          </div>

        </div>
        <div class="modal-footer">
          <button type="button"
                  class="btn pull-right o-b-color"
                  v-if="currentPage == 1 || currentPage == 2"
                  @click="selectPart(currentPage+1)">下一步</button>
          <button type="button"
                  class="btn pull-right o-b-color"
                  style="margin-right: 20px;"
                  v-if="partActive && (currentPage == 1 || currentPage == 2) && saveBtn"
                  @click="savePremisesPre(currentPage)">保存</button>
          <button type="button"
                  class="btn pull-right o-b-color"
                  v-if="currentPage != 1 && currentPage != 2 && savePremisesBtn"
                  @click="savePremisesPre(currentPage)">保存楼盘</button>
          <button class="btn pull-right o-color saveAndNext"
                  v-if="currentPage == 3 && saveAndNextBtn"
                  @click="selectPart(3)">保存并下一步</button>
          <button class="btn pull-right o-color saveAndNext"
                  v-if="currentPage == 4 && saveAndNextBtn"
                  @click="selectPart(4)">保存并下一步</button>
          <!--<button class="btn pull-right o-color saveAndNext"  @click="toOverdueConfig(1,null)">去配置</button>-->
        </div>
      </div>
    </div>
    <!-- 节点说明时间轴 start -->
    <Modal v-model="timelineModal"
           width="900">
      <p slot="header"
         style="color:#000;text-align:center">
        <span>保护时间节点说明</span>
      </p>
      <div class="timelineModal"
           style="text-align:center;height: 300px;padding-top:30px;width:800px;padding-left: 60px;">
        <div style="display:flex;position: relative;">
          <div class="horizontalLine"
               :class="{'o-border-color':timelineExplainFlag==1}"></div>
          <div class="dot"
               :class="{'o-border-color':timelineExplainFlag==1}"><span :class="{'o-color':timelineExplainFlag==1}">接触客户</span></div>
          <div class="horizontalLine"
               :class="{'o-border-color':timelineExplainFlag==1}"></div>
          <div class="dot"
               :class="{'o-border-color':timelineExplainFlag==1 || timelineExplainFlag==2}"><span :class="{'o-color':timelineExplainFlag==1 || timelineExplainFlag==2}">报备客户</span></div>
          <div class="horizontalLine"
               :class="{'o-border-color':timelineExplainFlag==2}"></div>
          <div class="dot"
               :class="{'o-border-color':timelineExplainFlag==2}"><span :class="{'o-color':timelineExplainFlag==2}">客户到访</span></div>
          <div class="horizontalLine-half"
               :class="{'o-border-color':timelineExplainFlag==2}"></div>
          <div class="horizontalLine-half"
               :class="{'o-border-color':timelineExplainFlag==3}"></div>
          <div class="dot"
               :class="{'o-border-color':timelineExplainFlag==3}"><span :class="{'o-color':timelineExplainFlag==3}">交易签约</span></div>
          <div class="horizontalLine"
               :class="{'o-border-color':timelineExplainFlag==3}"></div>
          <div class="verticalLine1"
               :class="{'o-b-color':timelineExplainFlag==1}"></div>
          <div class="verticalLine2"
               :class="{'o-b-color':timelineExplainFlag==2}"></div>
          <div class="verticalLine3"
               :class="{'o-b-color':timelineExplainFlag==3}"></div>
          <div class="itemText1"
               :class="{'o-b-color':timelineExplainFlag==1}">最短报备时间限制</div>
          <div class="itemText2"
               :class="{'o-b-color':timelineExplainFlag==2}">到访延长时间限制</div>
          <div class="itemText3"
               :class="{'o-b-color':timelineExplainFlag==3}">交易延长时间限制</div>
        </div>
        <div class="tips1"
             v-if="timelineExplainFlag==1">
          限制<span class="o-color">报备时间</span>距离<span class="o-color">预计到访时间</span>的<span class="o-color">最少提前时间量</span>，短于这个时<br />
          间量将不能进行常规报备，需要带看到访后由驻场人员代报备
        </div>
        <div class="tips2"
             v-if="timelineExplainFlag==2">
          允许<span class="o-color">预计到访时间</span>延后的<span class="o-color">最大时间量</span>，超过这个时间还未到访的<br />客户将<span class="o-color">自动转为为无效客户</span>
        </div>
        <div class="tips3"
             v-if="timelineExplainFlag==3">
          <span class="o-color">确认到访后</span>，在此规定时间内，未能进入下个交易环节的客户将<br /><span class="o-color">自动转为无效客户</span>，不填写默认设置为7天
        </div>
      </div>
      <div slot="footer">
      </div>
    </Modal>
    <!-- 节点说明时间轴 end -->
    <!-- 添加分销佣金 start -->
    <div id="fade"
         class="black_overlay"></div>
    <div id="mydiv"
         class="white_content"
         style="height:270px !important;">
      <div class="white_content_header">
        <span class="white_content_title">添加分销佣金</span>
        <span class="white_content_close"
              @click="closeModal">×</span>
      </div>
      <div style="text-align:center;line-height: 40px;margin-top: 20px;">
        <label class="control-label"
               style="width:70px"><span class="o-color">*</span>方案名称</label>
        <input v-model="commisionModalData.opType"
               class="form-control"
               style="padding:6px 6px;display:inline;width:72%;">
        <label class="control-label"
               style="width:70px"><span class="o-color">*</span>设置佣金</label>
        <input type="number"
               step="0.01"
               v-model="commisionModalData.commision"
               class="form-control"
               style="width:50%;display:inline">
        <div class=""
             style="display: inline-flex;">
          <Select v-model="commisionModalData.commisionUnit"
                  style="width:76px">
            <Option value="元">元</Option>
            <Option value="%">%</Option>
          </Select>
        </div>
        <label class="control-label"
               style="width:70px; height:85px;"><span class="o-color">*</span>添加描述</label>
        <textarea v-model="commisionModalData.commisionDesc"
                  class="form-control"
                  style="padding:6px 6px;display:inline;width:72%; height: 66px;" />
      </div>
      <div style='position: absolute;bottom: 10px;left: 0;text-align:center;width:100%;'>
        <button class="first_white_button1"
                @click="saveCommisionSet">保存佣金设置</button>
      </div>
    </div>
    <!-- 添加分销佣金 end -->
    <input type="file"
           id="iviewUp"
           @change="textImageUpload"
           style="display: none" />
    <OverdueConfigAdd ref="overdueConfigAdd"
                      v-on:setOverdueData="setOverdueData"></OverdueConfigAdd>
  </div>
</template>

<script>
import swiper from "../../assets/js/multiple-select.js";
import calendar from "../common/calendar.vue";
import viewer from "../../assets/js/viewer.js";
import OverdueConfigAdd from "./overdueConfigAdd.vue";
// import selectUserModal from './selectUserModal.vue'
const toolbarOptions = [
  ["bold", "italic", "underline", "strike"], // toggled buttons
  ["blockquote", "code-block"],

  [{ header: 1 }, { header: 2 }], // custom button values
  [{ list: "ordered" }, { list: "bullet" }],
  [{ script: "sub" }, { script: "super" }], // superscript/subscript
  [{ indent: "-1" }, { indent: "+1" }], // outdent/indent
  [{ direction: "rtl" }], // text direction

  [{ size: ["small", false, "large", "huge"] }], // custom dropdown
  [{ header: [1, 2, 3, 4, 5, 6, false] }],

  [{ color: [] }, { background: [] }], // dropdown with defaults from theme
  [{ font: [] }],
  [{ align: [] }],
  ["link", "image", "video"],
  ["clean"] // remove formatting button
];
export default {
  props: ["premisesMapAddress"],
  data() {
    let _self = this;
    return {
      linkM2BtnShow: false,
      checkSwitchShow: false,
      M2TipShow: false,
      saveBtn: true,
      savePremisesBtn: true,
      saveAndNextBtn: true,
      clientHeight: 0,
      currentPage: 1,
      fillInfoStatus1: false,
      fillInfoStatus2: false,
      fillInfoStatus3: false,
      partOne: true,
      partTwo: false,
      partThree: false,
      partFour: false,
      partFive: false,
      companyInfoCheck: false,
      distributionCheckbox: [],
      otherInfoCheckbox: [],
      rewardData: {
        visitReward: "",
        dealReward: "",
        cashReward: ""
      },
      commisionModalData: {
        opType: "",
        commision: "",
        commisionUnit: "元"
      },
      timelineModal: false,
      timelineExplainFlag: "1",
      body: {
        params: {}
      },
      partActive: false,
      quillAdd: "",
      editorOptionAdd: {
        placeholder: "请输入内容",
        theme: "snow", // or 'bubble'
        modules: {
          toolbar: {
            container: toolbarOptions, // 工具栏
            handlers: {
              // handlers object will be merged with default handlers object
              image: function (value, e) {
                if (value) {
                  document.getElementById("iviewUp").click();
                  _self.quillAdd = this.quill;
                } else {
                }
              }
            }
          }
        }
      },
      premises: {
        id: "",
        saleStatus: 1,
        commissionWay: 1,
        reportWay: "1",
        completeNode: 1,
        name: "",
        urlBase64: "", //初始化封面图片
        url: "",
        chief: "",
        chiefMobile: "",
        manager: "",
        mobile: "",
        saveDays: 7, //默认7天
        saveDaysType: 1, // 单位：天
        visitProtectType: "4", //默认分钟
        visitBaohuType: "5", //默认同报备保护期
        reportValidType: "5",
        projectCodeM2: "",
        checkSwitch: "0",
        provinceId: 0,
        cityId: 0,
        areaId: 0
      },
      province_list: [],
      baseCodeValueList: [],
      buildingType_list: [],
      city_list: [],
      area_list: [],
      estate_list: [],
      decoration_list: [],
      imgUrl: "",
      commissionList: [],
      premisesImages: [],
      editPremisesImgs: [],
      premisesTypes: [3, 4, 5, 6, 7],
      premisesImageInit: [],
      licenseList: [],
      premisesNames: "", //重复楼盘
      repeatPremisesNameFlag: false,
      editHouseTypeList: [
        {
          beginArea: "",
          endArea: "",
          averageBeginPrice: "",
          averageEndPrice: "",
          url: []
        }
      ],
      beginPrice: "",
      endPrice: "",
      visitOverdueData: {},
      dealOverdueData: {},
      protectOverdueData: {},
      validOverdueData: {},
      addressInfo: "未获取楼盘定位，点击选择楼盘定位",
      premiseAddressInfo: {},
      premsieProvinceName: "",
      premsieCityName: "",
      premiseAreaName: "",
      premisesFileList: [],
      fileTypeList: [
        { type: "doc", code: "8" },
        { type: "docx", code: "8" },
        { type: "ppt", code: "10" },
        { type: "pptx", code: "10" },
        { type: "xls", code: "9" },
        { type: "xlsx", code: "9" },
        { type: "pdf", code: "12" },
        { type: "zip", code: "13" },
        { type: "rar", code: "13" },
        { type: "jpg", code: "11" },
        { type: "jpeg", code: "11" },
        { type: "img", code: "11" },
        { type: "icon", code: "11" },
        { type: "png", code: "11" },
        { type: "gif", code: "11" }
      ]
    };
  },
  watch: {
    "$store.getters.premisesName": {
      handler(val, oldVal) {
        if (val) {
          this.premises.name = val;
          this.$forceUpdate();
        }
      },
      deep: true
    },
    "$store.getters.projectCode": {
      handler(val, oldVal) {
        if (val) {
          this.premises.projectCodeM2 = val;
          this.$forceUpdate();
        }
      },
      deep: true
    },
    "finalPremisesMapAddress.lng": {
      handler(val) {
        if (val) {
          this.addressInfo = "已获取楼盘定位，点击查看或修改";
        } else {
          this.addressInfo = "未获取楼盘定位，点击选择楼盘定位";
        }
      },
      deep: true
    }
  },
  computed: {
    finalPremisesMapAddress() {
      return this.premisesMapAddress;
    }
  },
  mounted() {
    //初始化窗口大小
    this.clientHeight = document.body.clientHeight - 180;
    ////判断该渠道是否开通M2
    this.getCompanyInfo();
    //楼盘基本信息
    this.provinceList();
    this.enumList();
    this.getBaseCodeValueList();
    //户型信息
    this.getDecoration();
    this.getHouseStruct();
    this.showPart(3);
  },
  components: {
    calendar,
    OverdueConfigAdd
  },
  methods: {
    // 打开地图选址的弹框
    openMapModal() {
      if (!this.premises.name) {
        layer.msg("请先输入楼盘名称");
        return false;
      }
      this.premiseAddressInfo = {
        address: this.finalPremisesMapAddress.premisesAddress,
        lng: this.finalPremisesMapAddress.lng,
        lat: this.finalPremisesMapAddress.lat,
        premiseName: this.premises.name,
        provinceName: this.premsieCityName
      };
      this.$emit("openMapModal", this.premiseAddressInfo);
    },
    // 根据输入的楼盘地址获取经纬度
    addressChange() {
      if (!this.finalPremisesMapAddress.premisesAddress.trim()) {
        return false;
      }
      var url = this.utilHelper.apiUrl + "/map/getBMapInfoByAddress";
      let content =
        this.premsieProvinceName === this.premsieCityName
          ? this.premsieProvinceName +
            this.premiseAreaName +
            this.finalPremisesMapAddress.premisesAddress.trim()
          : this.premsieProvinceName +
            this.premsieCityName +
            this.premiseAreaName +
            this.finalPremisesMapAddress.premisesAddress.trim();
      this.$http
        .get(url, {
          params: { content: content }
        })
        .then(
          (response) => {
            var resData = response.body.data;
            if (resData.status == "0") {
              this.finalPremisesMapAddress.lat = resData.result.location.lat;
              this.finalPremisesMapAddress.lng = resData.result.location.lng;
              this.addressInfo = "已获取楼盘定位，点击查看或修改";
            } else {
              this.finalPremisesMapAddress.lat = "";
              this.finalPremisesMapAddress.lng = "";
              this.addressInfo = "未获取楼盘定位，点击选择楼盘定位";
            }
          },
          (response) => {
            layer.msg("系统异常");
          }
        );
    },
    getCompanyInfo() {
      var _self = this;
      var body = {};
      body.params = {};
      var url = _self.utilHelper.apiUrl + "/api/getCompanyByUserId";
      _self.$http.post(url, body).then(
        (response) => {
          var resData = response.body.resData;
          if (resData.result == "1") {
            let isLinkM2 = resData.company.linkM2;
            let checkSwitch = resData.company.checkSwitch;
            this.linkM2BtnShow = isLinkM2 && isLinkM2 == 1 ? true : false;
            this.checkSwitchShow =
              checkSwitch && checkSwitch == 1 ? true : false;
          }
        },
        (response) => {
          layer.msg("系统异常");
        }
      );
    },
    linkM2() {
      //清除存储信息
      this.$store.commit("set_premisesName", "");
      this.$store.commit("set_projectCodeM2", "");
      //设置信息
      this.$store.commit("set_premisesName", this.premises.name);
      this.$store.commit("set_freshSelectUserData", "refresh");
      $("#linkM2Modal").modal({
        backdrop: "static",
        keyboard: false
      });
    },
    showM2Tip(flag) {
      this.M2TipShow = flag == 1 ? true : false;
    },
    checkboxChange(type) {
      if (type == "dealReward" && this.rewardData.dealReward) {
        this.rewardData.cashReward = !this.rewardData.dealReward;
        this.rewardData.dealReward = this.rewardData.dealReward;
      } else if (type == "cashReward" && this.rewardData.cashReward) {
        this.rewardData.dealReward = !this.rewardData.cashReward;
        this.rewardData.cashReward = this.rewardData.cashReward;
      }
      this.premises.dealAward = "";
    },
    showSelectUserModal(type) {
      this.$store.commit("set_freshSelectUserData", "fresh");

      this.$store.commit("set_selectUserDataType", type);
      $("#selectUserModal").modal("show");
    },
    showExplain(flag) {
      this.timelineModal = true;
      this.timelineExplainFlag = flag;
    },
    selectPart(part, from) {
      if (from && from == "timeline") {
        if (this.currentPage == 1 && part > 1) {
          if (!this.partOneCheck()) {
            this.fillInfoStatus1 = false;
            //layer.msg('楼盘基本信息还有必填字段未填或格式不对！');
            return;
          } else {
            this.setPartOneParams();
            this.fillInfoStatus1 = true;
          }
        }
        if (this.currentPage == 2 && part > 2) {
          if (!this.partTwoCheck()) {
            this.fillInfoStatus2 = false;
            //layer.msg('户型信息还有必填字段未填或格式不对！');
            return;
          } else {
            this.setPartTwoParams();
            this.fillInfoStatus2 = true;
          }
        }
        if (this.currentPage == 3 && part > 3) {
          if (!this.partThreeCheck()) {
            this.fillInfoStatus3 = false;
            //layer.msg('分销信息还有必填字段未填或格式不对！');
          } else {
            layer.msg("请保存楼盘信息！");
          }
          return;
        }
        if (this.currentPage != part && this.premises.id) {
          layer.confirm(
            "您即将离开该页面，确定数据已保存？",
            { title: "友情提示" },
            (index) => {
              if (
                this.body.params.id &&
                (part == 1 || part == 2) &&
                this.currentPage != part
              ) {
                this.partActive = true;
              }
              this.showPart(part);
              layer.close(index);
            }
          );
        } else {
          this.showPart(part);
        }
      } else {
        if (this.currentPage == 1 && this.partOneCheck()) {
          this.fillInfoStatus1 = true;
          this.setPartOneParams();
        } else if (this.currentPage == 2 && this.partTwoCheck()) {
          this.fillInfoStatus2 = true;
          this.setPartTwoParams();
        } else if (this.currentPage == 3 && this.partThreeCheck()) {
          this.fillInfoStatus3 = true;
          this.setPartTwoParams();
          this.setPartThreeParams();
          this.savePremises();
          return;
        } else if (part == 4) {
          this.setPartTwoParams();
          this.setPartFourParams();
          this.savePremises();
          return;
        } else {
          return;
        }
        this.showPart(part);
      }
    },
    showPart(part) {
      this.currentPage = part;
      this.partOne = part == 1 ? true : false;
      this.partTwo = part == 2 ? true : false;
      this.partThree = part == 3 ? true : false;
      this.partFour = part == 4 ? true : false;
      this.partFive = part == 5 ? true : false;
    },
    savePremisesPre(currentPage) {
      if (currentPage == 1) {
        if (!this.partOneCheck()) return;
        this.setPartOneParams();
        this.savePremises();
      } else if (currentPage == 2) {
        if (!this.partTwoCheck()) return;
        this.setPartTwoParams();
        this.savePremises();
      } else {
        if (currentPage == 3) {
          if (!this.partThreeCheck()) return;
          this.setPartThreeParams();
        } else {
          this.setPartFourParams();
          this.setPartFiveParams();
        }
        this.setPartTwoParams();
        this.savePremises(true);
      }
    },
    onPremisesFileChange(e) {
      var files = e.target.files || e.dataTransfer.files;
      if (!files.length) return;
      var size = files[0].size;
      // if
      if (size > 20 * 1024 * 1024) {
        layer.msg("文件大小不能超过20M");
        return;
      }
      var fileName = files[0].name;
      var validateTypeList = new Array(
        "doc",
        "docx",
        "ppt",
        "pptx",
        "xls",
        "xlsx",
        "pdf",
        "jpg",
        "jpeg",
        "img",
        "icon",
        "png",
        "gif"
      );
      var validateFlag = false;
      for (var i = 0; i < validateTypeList.length; i++) {
        if (fileName.toLowerCase().includes(validateTypeList[i])) {
          validateFlag = true;
          break;
        }
      }
      if (!validateFlag) {
        layer.msg("文件格式有误");
        return;
      }
      var _self = this;
      if (_self.premisesFileList.length >= 10) {
        layer.msg("文件数量不能超过10个");
        return;
      }
      _self.qiniuFileUpload(files[0]);
    },
    qiniuFileUpload(file) {
      var _self = this;
      var reader = new FileReader();
      reader.readAsDataURL(file);
      let indexNum = file.name.lastIndexOf(".") + 1;
      reader.onload = (e) => {
        //上传附件
        let msg = e.target.result;
        layer.load(0, {
          shade: false
        }); //弹出加载层
        var myForm = new FormData(); //创建formdata
        var blobBin = _self.dataURLtoBlob(msg); //base64转换blob
        myForm.append("blobObject", blobBin); //想formData添加blob数据
        myForm.append("suffix", file.name.substr(file.name.lastIndexOf("."))); //添加文件后缀
        var url = _self.utilHelper.apiUrl + "/api/uploadBase64ToQiNiu";
        _self.$http.post(url, myForm).then(
          (response) => {
            layer.closeAll("loading"); //关闭加载层
            if (response.status != 200) {
              layer.msg("图片上传失败，请重试");
              return;
            }
            var data = response.body;
            if (data.result == "1") {
              var fileTypeCode = "";
              for (var i = 0; i < _self.fileTypeList.length; i++) {
                if (
                  file.name.toLowerCase().includes(_self.fileTypeList[i].type)
                ) {
                  fileTypeCode = _self.fileTypeList[i].code;
                  break;
                }
              }
              _self.premisesFileList.push({
                isDeleted: 0,
                fileName: file.name,
                fileType: fileTypeCode,
                url: data.resData.imgName
              });
            } else {
              layer.msg("图片上传失败，请重试");
            }
          },
          (response) => {
            layer.msg(response);
          }
        );
      };
    },
    removepremiseFile(index) {
      var _self = this;
      if (_self.premisesFileList[index].id) {
        _self.premisesFileList[index].isDeleted = 1;
      } else {
        _self.premisesFileList.splice(index, 1);
      }
    },
    hideBtn() {
      this.saveBtn = false;
      this.savePremisesBtn = false;
      this.saveAndNextBtn = false;
    },
    showBtn() {
      this.saveBtn = true;
      this.savePremisesBtn = true;
      this.saveAndNextBtn = true;
    },
    savePremises(isClose) {
      var _self = this;
      if (_self.repeatPremisesNameFlag) {
        layer.msg("已存在同名楼盘：" + _self.premisesNames + ",请修改");
        return false;
      }
      _self.hideBtn();
      var url =
        _self.utilHelper.apiUrl +
        (this.body.params.id ? "/api/editPremises" : "/api/addPremises");
      _self.$http.post(url, _self.body).then(
        (response) => {
          var resData = response.body.resData;
          if (resData.result == "1") {
            _self.body.params.id = resData.premisesId;
            if (_self.currentPage == 3) {
              _self.visitOverdueData.premisesId = resData.premisesId;
              _self.dealOverdueData.premisesId = resData.premisesId;
              _self.protectOverdueData.premisesId = resData.premisesId;
              _self.validOverdueData.premisesId = resData.premisesId;
              var url = _self.utilHelper.apiUrl + "/api/overdueDecisionConfig";
              let visitParam = {};
              visitParam.params = _self.visitOverdueData;
              let dealParam = {};
              dealParam.params = _self.dealOverdueData;
              let protectParam = {};
              protectParam.params = _self.protectOverdueData;
              let validParam = {};
              validParam.params = _self.validOverdueData;
              _self.$http.post(url, visitParam).then((response) => {});
              _self.$http.post(url, dealParam).then((response) => {});
              _self.$http.post(url, protectParam).then((response) => {});
              _self.$http.post(url, validParam).then((response) => {});
            }
            if (_self.currentPage == 4 || _self.currentPage == 5) {
              let reqUrl =
                _self.utilHelper.apiUrl + "/api/selectPremisesImageList";
              _self.$http
                .post(reqUrl, { params: { premisesId: resData.premisesId } })
                .then((res) => {
                  let data = res.body.resData;
                  if (data.result == "1") {
                    if (data.list != null && data.list.length > 0) {
                      let premisesImagesArr = [];
                      let licenseImagesArr = [];
                      data.list.forEach((item) => {
                        if (
                          item.imageType == 3 ||
                          item.imageTyp == 4 ||
                          item.imageTyp == 5 ||
                          item.imageTyp == 6 ||
                          item.imageTyp == 7
                        ) {
                          premisesImagesArr.push(item);
                        } else if (
                          item.imageType == 60 ||
                          item.imageTyp == 70 ||
                          item.imageTyp == 80 ||
                          item.imageTyp == 90
                        ) {
                          licenseImagesArr.push(item);
                        }
                      });
                      _self.premisesImages = premisesImagesArr;
                      _self.licenseImages = licenseImagesArr;
                    }
                  }
                });
            }
            //将户型信息保存在展示用的户型列表中
            _self.editHouseTypeList = resData.imgList;
            if (
              _self.editHouseTypeList != null &&
              _self.editHouseTypeList.length > 0
            ) {
              _self.editHouseTypeList.forEach((item) => {
                item.toDelete = "0";
                item.room = item.aprtmentInfo[0]
                  ? item.aprtmentInfo[0] + "室"
                  : "无卧室";
                item.hall = item.aprtmentInfo[1]
                  ? item.aprtmentInfo[1] + "厅"
                  : "无厅";
                item.bathroom = item.aprtmentInfo[2]
                  ? item.aprtmentInfo[2] + "卫"
                  : "无卫生间";
                item.balcony =
                  item.aprtmentInfo[3] == "" || item.aprtmentInfo[3] == "0"
                    ? "无阳台"
                    : item.aprtmentInfo[3] + "阳台";
                //初始化
                item.beginArea = "";
                item.endArea = "";
                item.averageBeginPrice = "";
                item.averageEndPrice = "";
                //赋值
                if (item.averagePrice) {
                  let price = item.averagePrice.split(",");
                  if (price.length) item.averageBeginPrice = price[0];
                  if (price.length > 1) {
                    item.averageEndPrice = price[1];
                  } else {
                    this.fillInfoStatus2 = false;
                  }
                } else {
                  this.fillInfoStatus2 = false;
                }
                if (item.area) {
                  let area = item.area.split(",");
                  if (area.length) item.beginArea = area[0];
                  if (area.length > 1) {
                    item.endArea = area[1];
                  }
                } else {
                  this.fillInfoStatus2 = false;
                }
                if (item.url) {
                  item.url = item.url.split(";");
                } else {
                  item.url = [];
                }
              });
            }

            layer.msg(
              "保存成功",
              {
                time: 1500
              },
              function () {
                if (isClose) {
                  _self.$store.commit("set_premisesName", "");
                  _self.$store.commit("set_projectCodeM2", "");
                  $("#newPremisesAddModal").modal("hide");
                  _self.$emit("newPremisesAddListener");
                } else if (_self.currentPage == 3 || _self.currentPage == 4) {
                  _self.currentPage = _self.currentPage + 1;
                  _self.partOne = _self.currentPage == 1 ? true : false;
                  _self.partTwo = _self.currentPage == 2 ? true : false;
                  _self.partThree = _self.currentPage == 3 ? true : false;
                  _self.partFour = _self.currentPage == 4 ? true : false;
                  _self.partFive = _self.currentPage == 5 ? true : false;
                }
                _self.showBtn();
              }
            );
          } else {
            _self.showBtn();
            layer.msg("保存失败");
          }
        },
        (response) => {
          _self.showBtn();
          layer.msg(response);
        }
      );
    },
    closeModal() {
      document.getElementById("mydiv").style.display = "none";
      document.getElementById("fade").style.display = "none";
    },
    showModal() {
      let scrollHeight = document.body.scrollHeight; //文档高度
      document.getElementById("fade").style.height = scrollHeight + "px";
      document.getElementById("mydiv").style.display = "block";
      document.getElementById("fade").style.display = "block";
      this.commisionModalData.opType = "";
      this.commisionModalData.commision = "";
      this.commisionModalData.commisionDesc = "";
    },
    delCommission(index) {
      this.commissionList.splice(index, 1);
    },
    saveCommisionSet() {
      var _self = this;
      if (_self.verificationCommission()) {
        let format = this.commisionModalData.opType;
        let money = this.commisionModalData.commision;
        let desc = this.commisionModalData.commisionDesc;
        if (format && money) {
          let newArr = [];
          newArr[0] = {
            name: format,
            typeValue: money,
            type: this.commisionModalData.commisionUnit,
            desc: desc
          };
          _self.commissionList.push(newArr[0]);

          document.getElementById("mydiv").style.display = "none";
          document.getElementById("fade").style.display = "none";
        }
      }
    },
    addOpType() {
      this.showModal();
    },
    delHouseTypeItem(index) {
      this.editHouseTypeList.splice(index, 1);
    },
    addHouseTypeItem() {
      this.editHouseTypeList.push({
        beginArea: "",
        endArea: "",
        averageBeginPrice: "",
        averageEndPrice: "",
        url: []
      });
    },
    getDecoration() {
      var _self = this;
      var body = {};
      var url = _self.utilHelper.apiUrl + "/common/getEnum/OrientationsEnum";
      _self.$http.get(url, body).then((response) => {
        var body = response.body.data;
        _self.orientationsList = body;
      });
    },
    getHouseStruct() {
      var _self = this;
      var body = {};
      var url = _self.utilHelper.apiUrl + "/common/getEnum/HouseStructEnum";
      _self.$http.get(url, body).then((response) => {
        var body = response.body.data;
        _self.houseStructList = body;
      });
    },
    removeImage(row, index, type) {
      if (type == "premises") {
        this.premisesImages.splice(index, 1);
      } else if (type == "license") {
        this.licenseList.splice(index, 1);
      } else if (type == "faceUrl") {
        this.premises.url = "";
      } else if (type == "hxt") {
        row.splice(index, 1);
      }
      this.$forceUpdate();
    },
    typeChange: function (val) {
      let money = document.getElementById("set_money_id");
      let value = money.value;
      if (val === "1") {
        this.checkedMoney = true;
        this.checkedPercent = false;
      } else {
        this.checkedMoney = false;
        this.checkedPercent = true;
      }
    },
    //初始化多选下拉框
    initMultiple() {
      $("#buildingType").multipleSelect({
        filter: true,
        selectAllText: "全选"
      });
      $("#buildingType").multipleSelect("setSelects", []);
      $("#estateType").multipleSelect({
        filter: true,
        selectAllText: "全选"
      });
      $("#estateType").multipleSelect("setSelects", []);
      $("#baseCodeValue").multipleSelect({
        filter: true,
        selectAllText: "全选",
        minimumCountSelected: 10
      });
      $("#baseCodeValue").multipleSelect("setSelects", []);
    },
    getBaseCodeValueList() {
      //获取楼盘标签
      var _self = this;
      var body = {};
      body.params = {};
      var url = _self.utilHelper.apiUrl + "/api/getBaseCodeValueList";
      _self.$http.post(url, body).then((response) => {
        var resData = response.body.resData;
        if (resData.result == "1") {
          _self.baseCodeValueList = resData.baseCodeValueList;
        }
        _self.$nextTick(() => {
          _self.initMultiple();
        });
      });
    },
    provinceList: function () {
      var _self = this;
      var body = {};
      body.params = {};
      var url = _self.utilHelper.apiUrl + "/api/getProvince.do";
      _self.$http.post(url, body).then((response) => {
        var resData = response.body.resData;
        _self.province_list = resData.areaList;
      });
    },
    getCity() {
      var _self = this;
      var provinceId = $("#provinceId").val();
      if (!provinceId || provinceId == "0") {
        provinceId = _self.premises.provinceId;
      }
      let data = this.province_list.find((item) => item.id == provinceId);
      this.premsieProvinceName = data.name || "";
      var body = {};
      body.params = {
        areaId: provinceId
      };
      var url = _self.utilHelper.apiUrl + "/api/getCity.do";
      _self.$http.post(url, body).then((response) => {
        var resData = response.body.resData;
        if (resData.result == "1") {
          _self.city_list = resData.areaList;
          _self.area_list = [];
          _self.premises.cityId = "";
          _self.premises.areaId = "";
          //	_self.getArea();
        }
      });
    },
    getArea(name) {
      var _self = this;
      var cityId = $("#cityId").val();
      if (!cityId || cityId == "0") {
        cityId = _self.premises.cityId;
      }
      // console.log(cityId, this.city_list);
      let data = this.city_list.find((item) => item.id == cityId);
      this.premsieCityName = data.name || "";
      var body = {};
      body.params = {
        areaId: cityId
      };
      var url = _self.utilHelper.apiUrl + "/api/getArea.do";
      _self.$http.post(url, body).then((response) => {
        var resData = response.body.resData;
        if (resData.result == "1") {
          _self.area_list = resData.areaList;
          _self.premises.areaId = "";
        }
      });
    },
    getAddress() {
      var areaId = $("#areaId").val();
      if (!areaId || areaId == "0") {
        areaId = this.premises.areaId;
      }
      let data = this.area_list.find((item) => item.id == areaId);
      this.premiseAreaName = data.name || "";
    },
    enumList: function () {
      var _self = this;
      var body = {};
      body.params = {};
      var url = _self.utilHelper.apiUrl + "/common/getEnum/EstateTypeEnum";
      _self.$http.get(url, body).then((response) => {
        var body = response.body.data;
        _self.estate_list = body;
        _self.$nextTick(() => {
          _self.initMultiple();
        });
      });
      var url = _self.utilHelper.apiUrl + "/common/getEnum/DecorationTypeEnum";
      _self.$http.get(url, body).then((response) => {
        var body = response.body.data;
        _self.decoration_list = body;
      });
      var url =
        _self.utilHelper.apiUrl + "/common/getEnum/AbroadBuildingTypeEnum";
      _self.$http.get(url, body).then((response) => {
        var body = response.body.data;
        _self.buildingType_list = body;
        var selectedList = [];
        $.each(body, function (val, name) {
          selectedList.push(val);
        });
        _self.$nextTick(() => {
          _self.initMultiple();
        });
      });
    },
    //功能执行完后初始化图片预览
    imgViewer: function (id) {
      this.$nextTick(() => {
        $("#" + id).viewer();
      });
    },
    //创建文件对象
    onFileChange(e) {
      var files = e.target.files || e.dataTransfer.files;
      if (!files.length) return;
      var size = files[0].size;
      if (size > 3145728) {
        layer.msg("图片大小不能超过3M");
        return;
      }
      var alt = e.target.alt;
      this.createImage(files[0], alt);
    },
    createImage(file, alt) {
      var _self = this;
      var reader = new FileReader();
      reader.readAsDataURL(file);
      reader.onload = function (e) {
        _self.ajaxfile(file.name, e.target.result, alt);
      };
    },
    //将base64转换blob
    dataURLtoBlob(dataUrl) {
      var arr = dataUrl.split(","),
        mime = arr[0].match(/:(.*?);/)[1],
        bstr = atob(arr[1]),
        n = bstr.length,
        u8arr = new Uint8Array(n);
      while (n--) {
        u8arr[n] = bstr.charCodeAt(n);
      }
      return new Blob([u8arr], {
        type: mime
      });
    },
    //上传附件
    ajaxfile(fileName, file, alt) {
      layer.load(0, {
        shade: false
      }); //弹出加载层
      var _self = this;
      var myForm = new FormData(); //创建formdata
      var blobBin = _self.dataURLtoBlob(file); //base64转换blob
      myForm.append("blobObject", blobBin); //想formData添加blob数据
      myForm.append("suffix", fileName.substr(fileName.lastIndexOf("."))); //添加文件后缀
      var url = _self.utilHelper.apiUrl + "/api/uploadBase64ToQiNiu";
      _self.$http.post(url, myForm).then(
        (response) => {
          layer.closeAll("loading"); //关闭加载层
          var data = response.body;
          if (data.result == "1") {
            if (alt != null && alt != "") {
              var img = {};
              img.isDeleted = 0;
              img.imageUrl = data.resData.imgName;
              img.imageType = alt;
              if (alt.indexOf("hxtImg") != -1) {
                let index = alt.split("-")[1];
                _self.editHouseTypeList[index].url.push(data.resData.imgName);
              } else if (
                alt == 3 ||
                alt == 4 ||
                alt == 5 ||
                alt == 6 ||
                alt == 7
              ) {
                _self.premisesImages.push(img);
              } else {
                var index = -1;
                if (alt == 60 || alt == 90) {
                  for (var i = 0; i < _self.licenseList.length; i++) {
                    if (_self.licenseList[i].imageType == alt) {
                      index = i;
                      break;
                    }
                  }
                }
                if (index != -1) {
                  _self.licenseList[index].imageUrl = img.imageUrl;
                } else {
                  _self.licenseList.push(img);
                }
              }
            } else {
              _self.premises.url = data.resData.imgName;
              _self.premises.urlBase64 = file;
              this.imgViewer("faceImg");
            }
            this.$forceUpdate();
            this.clearImageCache();
          } else {
            layer.msg("图片上传失败，请重试");
          }
        },
        (response) => {
          layer.msg(response);
        }
      );
    },
    handleImageAdded: function (file, Editor, cursorLocation) {
      var _self = this;
      var formData = new FormData(); //创建formdata
      formData.append("blobObject", file);
      var myForm = new FormData(); //创建formdata
      myForm.append("blobObject", file); //想formData添加blob数据
      var url = _self.utilHelper.apiUrl + "/api/uploadBase64";
      _self.$http.post(url, myForm).then(
        (response) => {
          layer.closeAll("loading"); //关闭加载层
          var data = response.body;
          if (data.result == "1") {
            let url = data.resData.imgName;
            Editor.insertEmbed(cursorLocation, "image", url);
          } else {
            layer.msg("图片上传失败，请重试");
          }
        },
        (response) => {
          layer.msg(response);
        }
      );
    },
    setPartOneParams() {
      let estateType = $("#estateType").multipleSelect("getSelects");
      let buildingType = $("#buildingType").multipleSelect("getSelects");
      let baseCodeValue = $("#baseCodeValue").multipleSelect("getSelects");
      let averagePrice = "";
      if (this.beginPrice) {
        averagePrice += this.beginPrice + ",";
      }
      if (this.endPrice) {
        if (averagePrice.charAt(averagePrice.length - 1) == ",") {
          averagePrice += this.endPrice;
        } else {
          averagePrice += "," + this.endPrice;
        }
      }
      this.body.params.latitude = this.finalPremisesMapAddress.lat;
      this.body.params.longitude = this.finalPremisesMapAddress.lng;
      this.body.params.url = this.premises.url; //封面图
      this.body.params.name = this.premises.name;
      this.body.params.projectCodeM2 = this.premises.projectCodeM2;
      this.body.params.saleStatus = this.premises.saleStatus;
      this.body.params.provinceId = this.premises.provinceId;
      this.body.params.cityId = this.premises.cityId;
      this.body.params.areaId = this.premises.areaId;
      this.body.params.premisesAddress = this.finalPremisesMapAddress.premisesAddress;
      this.body.params.codeName = baseCodeValue.join(",");
      this.body.params.averagePrice = averagePrice;
      this.body.params.buildingType = buildingType.join(",");
      this.body.params.decorationType = this.premises.decorationType;
      this.body.params.estateType = estateType.join(",");
      this.body.params.propertyCharges = this.premises.propertyCharges;
      //设置开盘日期
      this.body.params.openingDate = this.utils.dateFormat(
        this.premises.openingTime,
        "yyyy-MM-dd"
      );
      //设置入住日期
      this.body.params.checkInDate = this.utils.dateFormat(
        this.premises.checkInTime,
        "yyyy-MM-dd"
      );
      this.body.params.plotRatio = this.premises.plotRatio;
      this.body.params.greeningRate = this.premises.greeningRate;
      this.body.params.propertyCompany = this.premises.propertyCompany;
      this.body.params.propertyAddr = this.premises.propertyAddr;
      this.body.params.rightYears = this.premises.rightYears;
      //规划户数
      this.body.params.houseHolds = this.premises.houseHolds;
      //地上车位数
      this.body.params.upCarPort = this.premises.upCarPort;
      //地下车位数
      this.body.params.downCarPort = this.premises.downCarPort;
      this.body.params.buildingCompany = this.premises.buildingCompany; //开发商
      this.body.params.saleAddr = this.premises.saleAddr; //售楼部地址
      this.body.params.panoramicView = this.premises.panoramicView;
    },
    setPartTwoParams() {
      let houseTypeList = [];
      this.editHouseTypeList.forEach((item) => {
        var area = item.beginArea;
        if (item.endArea) {
          area += "," + item.endArea;
        }
        houseTypeList.push({
          id: item.id,
          area: area,
          apartmentLayout: item.room + item.hall + item.bathroom + item.balcony,
          url: item.url.join(";"),
          orientations: item.orientations,
          averagePrice: item.averageBeginPrice + "," + item.averageEndPrice,
          huxingName: item.huxingName,
          houseStruct: item.houseStruct,
          decoration: item.decoration,
          toDelete: 0
        });
      });
      this.body.params.hxtInfo = JSON.stringify(houseTypeList);
    },
    setPartThreeParams() {
      //最短报备时间 按照原逻辑全部转为分钟
      let specialTimeType = this.premises.specialTimeType;
      if (specialTimeType == 4) {
        this.body.params.specialTime = "";
        this.body.params.specialTimeType = 4;
      } else {
        this.body.params.specialTime =
          specialTimeType == 1
            ? this.premises.specialTime * 1440
            : specialTimeType == 2
            ? this.premises.specialTime * 60
            : this.premises.specialTime;
        this.body.params.specialTimeType = this.premises.specialTimeType;
      }
      //到访延长时间
      let visitProtectType = this.premises.visitProtectType;
      if (visitProtectType == 4) {
        this.body.params.visitProtectSwitch = 0;
        this.body.params.visitProtect = "";
        this.body.params.visitProtectType = 4;
      } else {
        this.body.params.visitProtectSwitch = 1;
        this.body.params.visitProtect =
          visitProtectType == 1
            ? this.premises.visitProtect * 1440
            : visitProtectType == 2
            ? this.premises.visitProtect * 60
            : this.premises.visitProtect;
        this.body.params.visitProtectType = this.premises.visitProtectType;
      }
      // 到访保护时间
      let visitBaohuType = this.premises.visitBaohuType;
      if (visitBaohuType == "4" || visitBaohuType == "5") {
        this.body.params.visitBaohu = "";
        this.body.params.visitBaohuType = visitBaohuType;
      } else {
        this.body.params.visitBaohu =
          visitBaohuType == 1
            ? this.premises.visitBaohu * 1440
            : visitBaohuType == 2
            ? this.premises.visitBaohu * 60
            : this.premises.visitBaohu;
        this.body.params.visitBaohuType = visitBaohuType;
      }
      if (this.premises.visitBaohuRepeat == true) {
        this.body.params.visitBaohuRepeat = 1;
      } else {
        this.body.params.visitBaohuRepeat = 0;
      }

      //报备保护时间
      let reportProtectType = this.premises.reportProtectType;
      if (reportProtectType == 4) {
        this.body.params.reportProtect = "";
        this.body.params.reportProtectType = 4;
      } else {
        this.body.params.reportProtect =
          reportProtectType == 1
            ? this.premises.reportProtect * 1440
            : reportProtectType == 2
            ? this.premises.reportProtect * 60
            : this.premises.reportProtect;
        this.body.params.reportProtectType = reportProtectType;
      }

      //报备有效时间
      let reportValidType = this.premises.reportValidType;
      if (reportValidType == 5) {
        this.body.params.reportValid = "";
        this.body.params.reportValidType = 5;
      } else {
        this.body.params.reportValid =
          reportValidType == 1
            ? this.premises.reportValid * 1440
            : reportValidType == 2
            ? this.premises.reportValid * 60
            : this.premises.reportValid;
        this.body.params.reportValidType = reportValidType;
      }
      //交易延长时间
      let saveDaysType = this.premises.saveDaysType;
      if (saveDaysType == 4) {
        this.body.params.saveDays = "";
        this.body.params.saveDaysType = 4;
      } else {
        this.body.params.saveDays =
          saveDaysType == 1
            ? this.premises.saveDays * 1440
            : saveDaysType == 2
            ? this.premises.saveDays * 60
            : this.premises.saveDays;
        this.body.params.saveDaysType = this.premises.saveDaysType;
      }
      //复访开关
      if (this.premises.repeatDelayDealTime == true) {
        this.body.params.repeatDelayDealTime = 1;
      } else {
        this.body.params.repeatDelayDealTime = 0;
      }
      //到访转认筹不再保护开关
      if (this.premises.closeProtectMachine == true) {
        this.body.params.closeProtectMachine = 1;
      } else {
        this.body.params.closeProtectMachine = 0;
      }

      this.body.params.commissionWay = this.premises.commissionWay;
      this.body.params.cooperationBeginDate = this.utils.dateFormat(
        this.premises.cooperationBeginTime,
        "yyyy-MM-dd"
      );
      this.body.params.cooperationEndDate = this.utils.dateFormat(
        this.premises.cooperationEndTime,
        "yyyy-MM-dd"
      );
      this.body.params.reportWay = this.premises.reportWay;
      this.body.params.completeNode = this.premises.completeNode;
      this.body.params.checkSwitch = this.premises.checkSwitch;
      this.body.params.chief = this.$store.getters.selectUserDataChiefName;
      this.body.params.chiefMobile = this.$store.getters.selectUserDataChiefPhone;
      this.body.params.manager = this.$store.getters.selectUserDataManagerName;
      this.body.params.mobile = this.$store.getters.selectUserDataManagerPhone;
      this.body.params.commission = JSON.stringify(this.commissionList);
      this.body.params.reward = this.premises.reward;
      if (this.premises.dealAward) {
        this.body.params.dealType = this.rewardData.dealReward
          ? 1
          : this.rewardData.cashReward
          ? 2
          : "";
      } else {
        this.body.params.dealType = "";
      }
      this.body.params.dealAward = this.premises.dealAward;
      this.body.params.discount = this.distributionCheckbox.includes(
        "salesInfo"
      )
        ? this.premises.discount
        : "";
      this.body.params.feature = this.distributionCheckbox.includes(
        "projectFeature"
      )
        ? this.premises.feature
        : "";
      this.body.params.cooperationRule = this.distributionCheckbox.includes(
        "cooperationRules"
      )
        ? this.premises.cooperationRule
        : "";
    },
    setPartFourParams() {
      //楼盘相册
      this.body.params.premisesImages = JSON.stringify(this.premisesImages);
    },
    setPartFiveParams() {
      this.body.params.corporateName = this.companyInfoCheck
        ? this.premises.corporateName
        : "";
      this.body.params.corporateDesc = this.companyInfoCheck
        ? this.premises.corporateDesc
        : "";
      this.body.params.licenseImages = this.companyInfoCheck
        ? JSON.stringify(this.licenseList)
        : null;
      this.body.params.selling = this.otherInfoCheckbox.includes("houseSales")
        ? this.premises.selling
        : "";
      this.body.params.customer = this.otherInfoCheckbox.includes(
        "targetCustomer"
      )
        ? this.premises.customer
        : "";
      this.body.params.saleSkill = this.otherInfoCheckbox.includes(
        "exGuestSkill"
      )
        ? this.premises.saleSkill
        : "";
      this.body.params.introduction = this.otherInfoCheckbox.includes(
        "projectIntroduction"
      )
        ? this.premises.introduction
        : "";
      var premisesImageList = JSON.parse(this.body.params.premisesImages);
      for (var i = 0; i < this.premisesFileList.length; i++) {
        var premisesFile = {
          isDeleted: this.premisesFileList[i].isDeleted,
          imageUrl: this.premisesFileList[i].url,
          imageType: this.premisesFileList[i].fileType,
          imageName: this.premisesFileList[i].fileName
        };
        premisesImageList.push(premisesFile);
      }
      this.body.params.premisesImages = JSON.stringify(premisesImageList);
    },
    partOneCheck() {
      if (!this.premises.url) {
        layer.msg("请上传封面图!");
        return false;
      }
      if (!this.premises.name) {
        layer.msg("请输入楼盘名称!");
        return false;
      }
      if (!this.premises.provinceId) {
        layer.msg("请选择省份!");
        return false;
      }
      if (!this.premises.cityId) {
        layer.msg("请选择城市!");
        return false;
      }
      if (!this.premises.areaId) {
        layer.msg("请选择区域!");
        return false;
      }
      if (!this.finalPremisesMapAddress.premisesAddress) {
        layer.msg("请输入楼盘地址!");
        return false;
      }
      let baseCodeValue = $("#baseCodeValue").multipleSelect("getSelects");
      if (baseCodeValue.length == 0) {
        layer.msg("请选择楼盘标签!");
        return false;
      }
      if (!this.beginPrice || !this.endPrice) {
        layer.msg("请输入均价!");
        return false;
      }
      //平均单价区间判断
      if (this.beginPrice && this.endPrice) {
        if (parseFloat(this.beginPrice) > parseFloat(this.endPrice)) {
          layer.msg("平均单价区间填写错误");
          return false;
        }
      }
      let buildingType = $("#buildingType").multipleSelect("getSelects");
      if (buildingType.length == 0) {
        layer.msg("请选择建筑类别!");
        return false;
      }
      if (!this.premises.decorationType) {
        layer.msg("请选择装修状况!");
        return false;
      }
      let estateType = $("#estateType").multipleSelect("getSelects");
      if (estateType.length == 0) {
        layer.msg("请选择物业类型!");
        return false;
      }
      if (!this.premises.propertyCharges) {
        layer.msg("请输入物业费!");
        return false;
      }
      if (
        !this.finalPremisesMapAddress.lat ||
        !this.finalPremisesMapAddress.lng
      ) {
        layer.msg("请为楼盘选择位置!");
        return false;
      }

      var openTime = this.premises.openingTime;
      var checkInTime = this.premises.checkInTime;
      if (openTime && checkInTime) {
        var openTimeDate = new Date(openTime);
        var checkInTimeDate = new Date(checkInTime);
        //开盘日期 - 入住日期
        var diff = Date.parse(openTimeDate) - Date.parse(checkInTimeDate);
        if (diff >= 0) {
          layer.msg("入住日期必须大于开盘日期!");
          return false;
        }
      }
      var panoramicView = this.premises.panoramicView;
      if (panoramicView) {
        var urlReg = /(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?/;
        if (!urlReg.test(panoramicView)) {
          layer.msg("全景看房,请输入正确的网址!");
          return false;
        }
      }
      if (
        this.premises.panoramicView &&
        this.premises.panoramicView.length > 180
      ) {
        layer.msg("全景看房地址超长，请输入正确的网址!");
        return false;
      }
      return true;
    },
    partTwoCheck() {
      var editHouseTypeList = this.editHouseTypeList;
      if (editHouseTypeList.length <= 0) {
        layer.msg("请填写可售户型!");
        return false;
      }
      for (let index = 0; index < this.editHouseTypeList.length; index++) {
        const item = this.editHouseTypeList[index];
        if (!item.room || !item.hall || !item.bathroom || !item.balcony) {
          layer.msg(`请选择户型${index + 1}的户型格局!`);
          return;
        }
        if (!item.orientations) {
          layer.msg(`请选择户型${index + 1}的朝向!`);
          return;
        }
        if (!item.beginArea || !item.endArea) {
          layer.msg(`请填写户型${index + 1}的建筑面积!`);
          return;
        }
        if (item.beginArea && item.endArea) {
          if (parseFloat(item.beginArea) > parseFloat(item.endArea)) {
            layer.msg(`户型${index + 1}的建筑面积区间填写错误!`);
            return;
          }
        }
        if (!item.averageBeginPrice || !item.averageEndPrice) {
          layer.msg(`请填写户型${index + 1}的平均单价!`);
          return;
        }
        if (item.averageBeginPrice && item.averageEndPrice) {
          if (
            parseFloat(item.averageBeginPrice) >
            parseFloat(item.averageEndPrice)
          ) {
            layer.msg(`户型${index + 1}的平均单价区间填写错误!`);
            return;
          }
        }
        if (!item.url.length) {
          layer.msg(`请上传户型${index + 1}的户型图!`);
          return;
        }
      }
      return true;
    },
    partThreeCheck() {
      var numberReg = /^[1-9][0-9]*$/;
      var dealAwardReg = /^\d{0,6}$/;

      if (this.premises.specialTimeType != 4 && !this.premises.specialTime) {
        layer.msg("请输入最短报备时间!");
        return false;
      }
      if (
        this.premises.specialTimeType != 4 &&
        !numberReg.test(this.premises.specialTime)
      ) {
        layer.msg("最短报备保护时间只能为整数!");
        return false;
      }
      if (this.premises.visitProtectType != 4 && !this.premises.visitProtect) {
        layer.msg("请输入到访延长时间!");
        return false;
      }
      if (
        this.premises.visitProtect &&
        !numberReg.test(this.premises.visitProtect)
      ) {
        layer.msg("到访延长时间只能为整数!");
        return false;
      }
      if (
        this.premises.visitBaohuType &&
        this.premises.visitBaohuType != 4 &&
        this.premises.visitBaohuType != 5 &&
        !this.premises.visitBaohu
      ) {
        layer.msg("请输入到访保护时间!");
        return false;
      }
      if (
        this.premises.visitBaohu &&
        !numberReg.test(this.premises.visitBaohu)
      ) {
        layer.msg("到访保护时间只能为整数!");
        return false;
      }
      if (
        this.premises.reportProtectType != 4 &&
        !this.premises.reportProtect
      ) {
        layer.msg("请输入报备保护时间!");
        return false;
      }
      if (
        this.premises.reportProtectType != 4 &&
        !numberReg.test(this.premises.reportProtect)
      ) {
        layer.msg("报备保护时间只能为整数!");
        return false;
      }
      if (this.premises.reportValidType != 5 && !this.premises.reportValid) {
        layer.msg("请输入报备有效时间!");
        return false;
      }
      if (
        this.premises.reportValidType != 5 &&
        !numberReg.test(this.premises.reportValid)
      ) {
        layer.msg("报备有效时间只能为整数!");
        return false;
      }
      if (this.premises.saveDaysType != 4 && !this.premises.saveDays) {
        layer.msg("请输入交易延长时间!");
        return false;
      }
      if (
        this.premises.saveDaysType != 4 &&
        !numberReg.test(this.premises.saveDays)
      ) {
        layer.msg("交易延长时间只能为整数!");
        return false;
      }
      if (!this.premises.commissionWay) {
        layer.msg("结佣方式不能为空!");
        return;
      }
      if (
        this.premises.cooperationBeginTime &&
        this.premises.cooperationEndTime
      ) {
        var cooperationBeginTimeDate = new Date(
          this.premises.cooperationBeginTime
        );
        var cooperationEndTimeDate = new Date(this.premises.cooperationEndTime);
        var diff =
          Date.parse(cooperationBeginTimeDate) -
          Date.parse(cooperationEndTimeDate);
        if (diff >= 0) {
          layer.msg("合作有效期起止日期必须大于终止日期!");
          return false;
        }
      }
      if (!this.premises.reportWay) {
        layer.msg("报备方式不能为空!");
        return;
      }

      if (this.premises.reportWay != "1" && !this.premises.completeNode) {
        layer.msg("补全号码时间不能为空!");
        return;
      }

      this.premises.chief = this.$store.getters.selectUserDataChiefName;
      if (!this.premises.chief) {
        layer.msg("请选择项目总监!");
        return false;
      }
      this.premises.manager = this.$store.getters.selectUserDataManagerName;
      if (!this.premises.manager) {
        layer.msg("请选择项目经理!");
        return false;
      }
      if (this.premises.reward && !numberReg.test(this.premises.reward)) {
        layer.msg("请输入正确的带看奖励,只能为整数!");
        return false;
      }
      if (
        this.premises.dealAward &&
        !dealAwardReg.test(this.premises.dealAward)
      ) {
        layer.msg("成交奖格式错误,请输入0~999999范围内的整数");
        return false;
      }
      return true;
    },
    verificationCommission() {
      let format = this.commisionModalData.opType;
      let money = this.commisionModalData.commision;
      var moneyReg = /^\+?[1-9][0-9]*(\.\d{1,2})?$/;
      var rateReg = /^(0|([1-9]\d)|(100))(\.\d{0,2})?$/;
      var formatReg = /(^$)|(^[\u4E00-\u9FA5a-zA-Z0-9\.\s+,，。]{1,250}$)/;
      if (!format) {
        layer.msg("方案名称不能为空!");
        return false;
      } else {
        if (format.length > 20) {
          layer.msg("方案名称名称超出最大长度20，请删减长度!");
          return false;
        }
        if (!formatReg.test(format)) {
          layer.msg("方案名称名称中存在特殊内容，请删除后再提交!");
          return false;
        }
      }
      if (!money) {
        layer.msg("佣金不能为空!");
        return false;
      }
      if (this.commisionModalData.commisionUnit == "元") {
        if (money && (money.length > 10 || !moneyReg.test(money))) {
          layer.msg("佣金金额格式错误，长度限制为10，保留两位小数");
          return false;
        }
      } else {
        if (money > 100 || money < 0.01) {
          layer.msg("佣金比例范围: 0.01 ~ 100.00");
          return false;
        }
      }
      return true;
    },
    checkPremisesName() {
      var _self = this;
      let body = {};
      body.params = { premisesName: this.premises.name };
      var url = _self.utilHelper.apiUrl + "/api/checkPremisesName";
      _self.$http.post(url, body).then(
        (response) => {
          var resData = response.body.resData;
          if (resData.result == "1") {
            if (resData.premisesNames) {
              this.repeatPremisesNameFlag = true;
              this.premisesNames = resData.premisesNames;
            } else {
              this.repeatPremisesNameFlag = false;
              this.premisesNames = "";
            }
          } else {
            this.repeatPremisesNameFlag = false;
            this.premisesNames = "";
          }
        },
        (response) => {
          layer.msg(response);
        }
      );
    },
    showImgCount(type) {
      let count = 0;
      if (this.premisesImages) {
        this.premisesImages.forEach((item) => {
          if (item.imageType == type) {
            count++;
          }
        });
        return count;
      } else {
        return 0;
      }
    },
    showLicenseImgCount(type) {
      let count = 0;
      if (this.licenseList) {
        this.licenseList.forEach((item) => {
          if (item.imageType == type) {
            count++;
          }
        });
        return count;
      } else {
        return 0;
      }
    },
    clearImageCache() {
      this.$refs.warrant.value = null;
      this.$refs.salePermit.value = null;
      this.$refs.distributorContract.value = null;
      this.$refs.businessLicense.value = null;
    },
    textImageUpload(e) {
      var _self = this;
      var files = e.target.files || e.dataTransfer.files;
      if (files[0].size > 3145728) {
        layer.msg("图片太大，请上传小于3M的图片");
        return;
      }
      var lod = layer.load(0, { shade: [0.1, "#000"] }); //弹出加载层
      var myForm = new FormData(); //创建formdata
      myForm.append("blobObject", files[0]); //想formData添加blob数据
      var url = _self.utilHelper.apiUrl + "/api/uploadBase64";
      _self.$http.post(url, myForm).then(
        (response) => {
          layer.closeAll("loading"); //关闭加载层
          var data = response.body;
          if (data.result == "1") {
            let url = data.resData.imgName;
            let length = _self.quillAdd.getSelection().index;
            _self.quillAdd.insertEmbed(length, "image", url);
            // 调整光标到最后
            _self.quillAdd.setSelection(length + 1);
          } else {
            layer.msg("图片上传失败，请重试");
          }
          document.getElementById("iviewUp").value = "";
          layer.close(lod);
        },
        (response) => {
          layer.msg(response);
          layer.close(lod);
        }
      );
    },
    initParams() {
      this.currentPage = 1;
      this.fillInfoStatus1 = false;
      this.fillInfoStatus2 = false;
      this.fillInfoStatus3 = false;
      this.partOne = true;
      this.partTwo = false;
      this.partThree = false;
      this.partFour = false;
      this.partFive = false;
      this.companyInfoCheck = false;
      this.distributionCheckbox = [];
      this.otherInfoCheckbox = [];
      this.rewardData = {
        visitReward: "",
        dealReward: "",
        cashReward: ""
      };
      this.commisionModalData = {
        opType: "",
        commision: "",
        commisionUnit: "元"
      };
      this.timelineModal = false;
      this.timelineExplainFlag = "1";
      this.selectUserData = { type: "" };
      this.body.params = {};
      this.partActive = false;
      this.premises = {};
      this.premises.id = "";
      this.premises.saleStatus = 1;
      this.premises.commissionWay = 1;
      this.premises.reportWay = "1";
      this.premises.completeNode = 1;
      this.premises.name = "";
      this.premises.urlBase64 = "";
      this.premises.url = "";
      this.premises.chief = "";
      this.premises.chiefMobile = "";
      this.premises.manager = "";
      this.premises.mobile = "";
      this.premises.saveDays = 7; //默认7天
      this.premises.saveDaysType = 1; //单位：天
      this.premises.visitBaohuType = 5;
      this.premises.reportValidType = 5;
      this.premises.projectCodeM2 = "";
      this.imgUrl = "";
      this.commissionList = [];
      this.premisesImages = [];
      this.editPremisesImgs = [];
      this.premisesImageInit = [];
      this.licenseList = [];
      this.premisesNames = "";
      this.repeatPremisesNameFlag = false;
      this.editHouseTypeList = [
        {
          beginArea: "",
          endArea: "",
          averageBeginPrice: "",
          averageEndPrice: "",
          url: []
        }
      ];
      this.beginPrice = "";
      this.endPrice = "";
      this.initMultiple();
    },
    toOverdueConfig(type) {
      //type 1 到访逾期，2交易逾期
      var _self = this;
      let specialTime = "";
      let saveDays = "";
      let premisesId = _self.body.params.id;
      specialTime = _self.setTimeUnit(
        _self.premises.reportProtect,
        _self.premises.reportProtectType
      );
      if (type == 1) {
        saveDays = _self.setTimeUnit(
          _self.premises.visitProtect,
          _self.premises.visitProtectType
        );
        _self.$refs.overdueConfigAdd.getOverdue(
          type,
          premisesId,
          _self.visitOverdueData,
          saveDays,
          specialTime
        );
      } else if (type == 2) {
        saveDays = _self.setTimeUnit(
          _self.premises.saveDays,
          _self.premises.saveDaysType
        );
        _self.$refs.overdueConfigAdd.getOverdue(
          type,
          premisesId,
          _self.dealOverdueData,
          saveDays,
          specialTime
        );
      } else if (type == 3) {
        saveDays = _self.setTimeUnit(
          _self.premises.reportProtect,
          _self.premises.reportProtectType
        );
        _self.$refs.overdueConfigAdd.getOverdue(
          type,
          premisesId,
          _self.protectOverdueData,
          saveDays,
          specialTime
        );
      } else if (type == 4) {
        saveDays = _self.setTimeUnit(
          _self.premises.reportValid,
          _self.premises.reportValidType
        );
        _self.$refs.overdueConfigAdd.getOverdue(
          type,
          premisesId,
          _self.validOverdueData,
          saveDays,
          specialTime
        );
      }

      $("#overdueConfigAdd").modal({
        backdrop: "static",
        keyboard: false,
        show: true
      });
    },
    setOverdueData(type, overdue) {
      //如果未保存楼盘则先暂存数据，添加楼盘一起保存
      var _self = this;
      if (type == 1) {
        //到访延长时间
        _self.visitOverdueData = overdue;
      } else if (type == 2) {
        //交易延长时间
        _self.dealOverdueData = overdue;
      } else if (type == 3) {
        //交易延长时间
        _self.protectOverdueData = overdue;
      } else if (type == 4) {
        //交易延长时间
        _self.validOverdueData = overdue;
      }
    },
    setTimeUnit(num, type) {
      if (type == 3) {
        return num + "分钟";
      } else if (type == 2) {
        return num + "小时";
      } else if (type == 1) {
        return num + "天";
      } else if (type == 4) {
        return "不需要";
      }
    }
  }
};
</script>
<style scoped>
@import url("../../assets/css/multiple-select.css");
.o-color {
  color: #e98d4a !important;
}
.o-b-color {
  background-color: #e98d4a !important;
  border-color: #e98d4a !important;
  color: #fff !important;
}
.o-border-color {
  border-color: #e98d4a !important;
}
.g-color {
  background: #1abc9c !important;
  color: #fff !important;
}
.r-border {
  border-right: 1px solid #ddd;
}
.modal-content {
  margin-top: 10px !important;
}
.layui-timeline {
  padding-top: 20px;
}
.timeline-height {
  height: 80px !important;
}
.self-modal-dialog {
  width: 90%;
  margin: 0 auto;
}
.layui-timeline {
  padding-left: 120px;
}
.fillInfoStatus {
  position: absolute;
  left: -70px;
  top: 0;
  z-index: 10;
  width: 50px;
  height: 20px;
  line-height: 20px;
  background-color: #e4e4e4;
  color: #999999;
  text-align: center;
  border-radius: 3px;
}
.layui-text h3 {
  font-size: 15px;
  font-weight: 600;
}
.layui-timeline-axis {
  position: absolute;
  left: -3px;
  top: 0;
  z-index: 10;
  width: 16px;
  height: 16px;
  line-height: 16px;
  background-color: #fff;
  border-radius: 50%;
  text-align: center;
  border: 1px solid #e2e2e2;
}
.face-img {
  text-align: center;
  font-size: 15px;
  color: #000;
}
.add-huxing {
  width: 130px !important;
  height: 120px;
  position: relative;
  padding: 15px !important;
  border: 1px dashed #e2e2e2;
  background-color: #fff;
  text-align: center;
  cursor: pointer;
  color: #999;
  display: inline-block;
  margin: 20px 0 50px 0;
}
.add-huxing .layui-icon {
  font-size: 50px;
  color: #f87142;
}
.over-img {
  margin-left: 10px;
  margin-top: 0px;
}
.housing-list li {
  border-bottom-style: none;
  padding: 15px 0 !important;
}
.main-content .housing-list .addrLi {
  padding: 15px 0 0 !important;
}
.addrInfo {
  color: #e98d4a;
  font-size: 12px;
  text-decoration: underline;
  margin-left: 20px;
}
.list-info-templateTwo {
  padding-left: 0;
}
.list-info-templateTwo .control-labelTwo {
  font-weight: normal !important;
  font-size: 15px;
  min-width: 95px;
  padding-left: 20px;
}
.list-info-template .control-label {
  font-weight: normal !important;
  font-size: 15px;
  min-width: 95px;
}
.list-info-template .form-control {
  height: 36px !important;
}
.list-info-template .control-details label {
  margin-right: 0 !important;
}
.base-title {
  font-weight: 700;
  font-style: normal;
  font-size: 18px;
  text-align: left;
  color: #000;
  margin-top: 20px;
  height: 33px;
  line-height: 33px;
}
.base-title .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #f87142;
  margin: 0 30px;
}
.base-title .tips {
  font-size: 13px;
  color: #999999;
  font-weight: normal;
  padding-left: 10px;
}
.base-title .questionImg {
  width: 18px;
  height: 18px;
}
.base-title .linkM2Btn {
  display: inline-block;
  width: 110px;
  height: 30px;
  line-height: 30px;
  background: #3365ff;
  color: #fff;
  font-size: 14px;
  font-weight: normal;
  text-align: center;
  border-radius: 3px;
}
.base-title .m2TipContent {
  position: absolute;
  z-index: 99999;
  display: inline-block;
  width: 260px;
  height: 100px;
  font-size: 13px;
  font-weight: normal;
  line-height: 20px;
  background: #f2f2f2;
  color: #3365ff;
  padding: 10px;
  right: 0.5vw;
  top: 26px;
  border-radius: 3px;
}

.base-title-small {
  font-weight: 500;
  font-size: 16px;
  font-style: normal;
  text-align: left;
  color: #000;
  padding: 0px 40px;
  height: 25px;
  line-height: 25px;
  background-color: #f0f0f0;
}

.user-define li {
  padding: 0px !important;
  margin: 0px !important;
}
.ms-choice {
  height: 33px !important;
  line-height: 33px !important;
}
.addHouseTypeItemBtn {
  width: 120px;
  height: 36px;
  line-height: 36px;
  border: 1px solid #f87142;
  color: #f87242;
  border-radius: 3px;
  text-align: center;
}
.delHouseTypeItemBtn {
  display: inline-block;
  width: 100px;
  height: 33px;
  line-height: 33px;
  border: 1px solid #ff6a6a;
  color: #ff6a6a;
  border-radius: 3px;
  text-align: center;
  font-size: 15px;
  font-weight: normal;
  float: right;
  margin-right: 7.5vw;
}
.ivu-checkbox-group label {
  font-weight: normal !important;
}
.partThree .commonLi {
  padding-bottom: 60px;
  margin-bottom: 60px;
  margin-top: 20px;
}
.partThree .otherLi,
.partFive .otherLi {
  display: inline-block;
  padding-top: 30px;
}
.ivu-table-large td {
  height: 40px !important;
}
.ivu-table-large th {
  height: 40px !important;
}
.commissionTable {
  width: 100%;
  display: block;
}
.commissionTable .eachItem,
.commissionTableBody .eachItem {
  line-height: 40px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  font-size: 14px;
}
.commissionTable td,
.commissionTable th,
.rewardTable td,
.rewardTable th {
  border: 1px solid #ddd;
  color: #666;
  height: 40px;
  text-align: center;
}
.commissionTable thead th,
.rewardTable thead th {
  background-color: #f8f8f9;
}
.commissionTable thead th:nth-child(1) {
  width: 120px;
}
.commissionTable thead th:nth-child(2) {
  width: 160px;
}
.rewardTable thead th:nth-child(1) {
  width: 80px;
}
.rewardTable thead th:nth-child(2) {
  width: 120px;
}
.rewardTable thead th:nth-child(3) {
  width: 160px;
}
.rewardTable input {
  height: 100%;
  width: 100%;
  border-style: none;
  font-size: 15px;
  padding: 0 8px;
}
.saveAndNext {
  border: 1px solid #e98d4a;
  background: #fff;
  margin-right: 20px;
}
.ivu-modal-footer {
  border-top-style: none !important;
  padding: 0 !important;
}
.timelineModal .dot {
  border: 2px solid #cfcfcf;
  width: 15px;
  height: 15px;
  border-radius: 50px;
  background: white;
  margin: auto;
  margin-bottom: -7px;
  position: relative;
}
.timelineModal .dot span {
  position: absolute;
  width: 100px;
  left: -17px;
  top: 20px;
  display: inline-flex;
  font-size: 15px;
  font-weight: bold;
}
.timelineModal .item {
  flex: 1;
  display: flex;
  border-bottom: 1px solid #ddd;
  margin-top: -10px;
}
.timelineModal .horizontalLine {
  flex: 1;
  display: flex;
  border-bottom: 1px solid #ddd;
}
.timelineModal .horizontalLine-half {
  flex: 0.5;
  display: flex;
  border-bottom: 1px solid #ddd;
}
.timelineModal .verticalLine1 {
  width: 1px;
  height: 100px;
  border: 1px solid #ddd;
  position: absolute;
  top: 10px;
  left: 220px;
}
.timelineModal .verticalLine2 {
  width: 1px;
  height: 100px;
  border: 1px solid #ddd;
  position: absolute;
  top: 10px;
  right: 245px;
}
.timelineModal .verticalLine3 {
  width: 1px;
  height: 100px;
  border: 1px solid #ddd;
  position: absolute;
  top: 10px;
  right: 70px;
}
.timelineModal .itemText1 {
  position: absolute;
  width: 130px;
  height: 36px;
  border: 1px solid #ddd;
  border-radius: 20px;
  line-height: 36px;
  text-align: center;
  font-size: 13px;
  color: #999;
  top: 110px;
  left: 160px;
}
.timelineModal .itemText2 {
  position: absolute;
  width: 130px;
  height: 36px;
  border: 1px solid #ddd;
  border-radius: 20px;
  line-height: 36px;
  text-align: center;
  font-size: 13px;
  color: #999;
  top: 110px;
  right: 175px;
}
.timelineModal .itemText3 {
  position: absolute;
  width: 130px;
  height: 36px;
  border: 1px solid #ddd;
  border-radius: 20px;
  line-height: 36px;
  text-align: center;
  font-size: 13px;
  color: #999;
  top: 110px;
  right: 5px;
}
.timelineModal .tips1 {
  position: absolute;
  top: 270px;
  left: 220px;
  color: #999;
}
.timelineModal .tips2 {
  position: absolute;
  top: 270px;
  right: 70px;
  text-align: left;
  color: #999;
}
.timelineModal .tips3 {
  position: absolute;
  top: 270px;
  right: 50px;
  text-align: right;
  color: #999;
}
.ivu-input-number,
.ivu-input-number-small .ivu-input-number-input-wrap,
.ivu-input-number-small input {
  height: 33px !important;
  line-height: 33px;
  width: 7vw !important;
}
.ivu-input-number-small .ivu-input-number-handler {
  height: 16px !important;
}
.file-image {
  margin-right: 30px;
  width: 150px;
  height: 115px;
  float: left;
  position: relative;
  margin-bottom: 10px;
}
#myTabContent {
  padding: 20px 0;
}
.fa-times-circle {
  position: absolute;
  right: 3px;
  top: 2px;
}
.selectUserName {
  width: 19vw;
  height: 36px;
  line-height: 36px;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 0 8px;
  color: #ccc;
  font-size: 14px;
}
.roomSelect {
  width: 12vw !important;
  padding: 6px 4px !important;
  display: inline;
  margin-left: 5px;
}

#discount,
#feature,
#cooperationRule,
#selling,
#customer,
#saleSkill,
#introduction {
  height: 200px;
}
.control-button-wrap {
  display: inline-block;
  height: 38px;
  border-radius: 3px;
  margin-left: 22px;
}
.white_content_header {
  width: 100%;
  height: 40px;
  line-height: 40px;
  background: rgba(248, 248, 248, 1);
  border-bottom: 1px solid #d3d3d3;
  text-align: center;
}
.control-button-wrap-content {
  min-width: 120px;
  min-height: 38px;
  line-height: 38px;
  border-radius: 3px;
  text-align: center;
  color: #999;
  border: 1px solid #d3d3d3;
  margin-top: 10px;
  position: relative;
  top: -10px;
}
.control-button-wrap-content .delete-commission {
  width: 10px;
  height: 10px;
  line-height: 10px;
  font-size: 10px;
  border-radius: 50%;
  border: 1px solid #f87242;
  color: #f87242;
  cursor: pointer;
  float: right;
}
.control-button-add {
  display: inline-block;
  width: 70px;
  height: 38px;
  line-height: 38px;
  text-align: center;
  border: 1px dashed #ccc;
  border-radius: 5px;
  color: #999;
  cursor: pointer;
  position: relative;
  top: -7px;
  margin-left: 5px;
}
.black_overlay {
  display: none;
  position: absolute;
  top: 0%;
  left: 0%;
  width: 100%;
  height: 100%;
  background-color: black;
  z-index: 1001;
  -moz-opacity: 0.8;
  opacity: 0.5;
  filter: alpha(opacity=50);
}
.white_content {
  display: none;
  position: absolute;
  top: 20%;
  left: 36%;
  width: 380px !important;
  height: 230px !important;
  border: 1px solid #d3d3d3;
  background-color: white;
  z-index: 1002;
  border-radius: 5px;
}
.white_content_title {
  color: #f87242;
  font-weight: 700;
  font-size: 14px;
}
.white_content_close {
  float: right;
  margin: 10px 10px 0 0;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  color: #999;
  font-size: 29px;
  border: 1px solid #d3d3d3;
  cursor: pointer;
}
.first_white_input {
  width: 80%;
  margin: 10px auto 20px;
}
.first_white_input .set_format,
.set_money {
  color: #333;
  font-size: 14px;
}
.first_white_input input {
  height: 32px;
  border-radius: 3px;
  outline: 0;
  border: 1px solid #999;
}
.first_white_input input:focus {
  border: 1px solid #f87242;
}
.select_type {
  width: 50px;
  height: 32px;
  float: right;
  border-radius: 5px;
  display: flex;
  flex-direction: row;
  cursor: pointer;
}
.select_type #type_money {
  width: 25px;
  height: 32px;
  line-height: 32px;
  color: #fff;
  border-top-left-radius: 5px;
  border-bottom-left-radius: 5px;
  text-align: center;
}
.select_type #type_percent {
  width: 25px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  color: #fff;
  border-top-right-radius: 5px;
  border-bottom-right-radius: 5px;
}
.set_money_input::-webkit-outer-spin-button,
.set_money_input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}
.set_money_input[type="number"] {
  -moz-appearance: textfield;
}
.check_type {
  background: #f87242;
}
.check_type1 {
  background: #d3d3d3;
}
.first_white_button1 {
  background: #f87242;
  color: #fff;
  width: 140px !important;
  height: 36px !important;
  line-height: 36px !important;
  text-align: center;
  font-size: 16px;
  border-radius: 3px;
  cursor: pointer;
  border-style: none;
}
.file-upload {
  width: 150px;
  height: 115px;
  position: relative;
  padding: 30px;
  border: 1px dashed #e2e2e2;
  background-color: #fff;
  text-align: center;
  cursor: pointer;
  color: #999;
  display: inline-block;
}
.file-upload:hover {
  border: 1px dashed #f87142;
}
.file-upload .layui-icon {
  font-size: 50px;
  color: #f87142;
}
#myTab li {
  padding: 0 !important;
}
.delay-button {
  position: absolute;
  top: 20px;
}
.premises_file {
  width: 130px !important;
  height: 44px;
  position: relative;
  padding: 15px !important;
  border: 1px dashed #e2e2e2;
  background-color: #fff;
  text-align: center;
  cursor: pointer;
  color: #999;
  display: inline;
  margin: 20px 0 50px 0;
  border: none;
}
.file-btn {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  outline: none;
  background-color: transparent;
  filter: alpha(opacity=0);
  -moz-opacity: 0;
  -khtml-opacity: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 0;
}
.file-upload {
  width: 150px;
  height: 115px;
  position: relative;
  padding: 30px;
  border: 1px dashed #e2e2e2;
  background-color: #fff;
  text-align: center;
  cursor: pointer;
  color: #999;
  display: inline-block;
}
.list-info-template li {
  padding: 0 !important;
}
</style>